AutoComplete Case Insensitive

439 views
Skip to first unread message

Morgan Yarbrough

unread,
Sep 2, 2013, 6:33:06 PM9/2/13
to ace-d...@googlegroups.com
I'd like for my auto-complete to not be case sensitive. Meaning I can type 'abc' then hit Ctrl+Space and load snippet with name 'ABC'.

I'm sure this is an easy fix if you know where to look in the source (I'm hosting my own copy of the source). Can someone please show me what I need to change to make this happen?

BTW-- to whom ever is developing this editor: ITS AWESOME!

Harutyun Amirjanyan

unread,
Sep 3, 2013, 4:53:41 AM9/3/13
to ace-d...@googlegroups.com
The version in the master branch already supports this
> --
> You received this message because you are subscribed to the Google Groups
> "Ajax.org Cloud9 Editor (Ace)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ace-discuss...@googlegroups.com.
> To post to this group, send email to ace-d...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ace-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.

Morgan Yarbrough

unread,
Sep 3, 2013, 6:30:02 AM9/3/13
to ace-d...@googlegroups.com
I downloaded the master branch about 24 hours ago. Is there a setting that I need to change to make it case insensitive? My editor is configured as follows:

<script src="../Scripts/src-min-noconflict/ace.js" type="text/javascript"  charset="utf-8"></script>
<script>
    //Setup ace editor. Must be located after the editor on the page
    var editor = ace.edit('editor');
    editor.setTheme("ace/theme/chrome");
    editor.getSession().setMode("ace/mode/javascript");
    editor.getSession().setUseWrapMode(true);
    editor.getSession().setWrapLimitRange(null, null);
    editor.setBehavioursEnabled(true);//auto pairing of quotes & brackets
    editor.setShowPrintMargin(false);
    editor.session.setUseSoftTabs(true);//use soft tabs (likely the default)   
      ace.config.loadModule('ace/ext/language_tools', function () {
        editor.setOptions({
            enableBasicAutocompletion: true,
            enableSnippets: true
        })
    });   
    editor.commands.addCommand({
        name: 'showKeyboardShortcuts',
        bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
        exec: function(editor) {
            ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
           module.init(editor);
           editor.showKeyboardShortcuts()
            })
    }
    });
    //Add custom snippets
    ace.config.loadModule('ace/snippets/snippets', function () {
        var snippetManager = ace.require('ace/snippets').snippetManager; 
        ace.config.loadModule('ace/snippets/javascript', function(m) {
            if (m) { 
                m.snippets.push({ 
                    content: '${1:test}.This is custom snippet text!', 
                    tabTrigger: 'testCustomSnippet' 
                });
                snippetManager.register(m.snippets, m.scope); 
            }
        });
    });

Morgan Yarbrough

unread,
Sep 3, 2013, 6:53:39 AM9/3/13
to ace-d...@googlegroups.com
I downloaded my version from here: https://github.com/ajaxorg/ace-builds/ less than 30 hours ago. 
  1. Is that not the master branch? 
  2. Is the live Kitchen sink demo not the master branch? -http://ace.c9.io/build/kitchen-sink.html
The version I downloaded and the live kitchen sink demo do not support case insensitive auto complete. Below is a screenshot to make sure that we are both on the same page about what case-insensitive auto-complete means. The screenshot is showing the current behavior of the kitchen sink demo, which is Not what I want (it is case sensitive). 



  • I want typing 'fu' to find all snippets that start with fu,Fu,fU, and FU (ignore the case). This is not the behavior of the current kitchen sink demo or the version I downloaded from the link mentioned above. 




On Tuesday, September 3, 2013 4:53:41 AM UTC-4, Harutyun Amirjanyan wrote:

Harutyun Amirjanyan

unread,
Sep 3, 2013, 10:52:15 AM9/3/13
to ace-d...@googlegroups.com
sorry i meant master branch of development version
https://github.com/ajaxorg/ace

you can try the latest version of autocompleter
https://rawgithub.com/ajaxorg/ace/autocomplete/kitchen-sink.html

i'll update version in ace-builds repository at the end of this week
until that you can clone https://github.com/ajaxorg/ace
and run node Makefile.dryice.js to build it

Morgan Yarbrough

unread,
Sep 3, 2013, 11:00:10 AM9/3/13
to ace-d...@googlegroups.com
Thank you

Morgan Yarbrough

unread,
Sep 8, 2013, 7:54:08 AM9/8/13
to ace-d...@googlegroups.com

i'll update version in ace-builds repository at the end of this week 

Is it the end of the week yet? I don't see any new commits. I found the build process to be far more complex that it sounds. I'm eagerly awaiting the new build with the enhanced auto complete. 

Harutyun Amirjanyan

unread,
Sep 8, 2013, 8:52:16 AM9/8/13
to ace-d...@googlegroups.com
Updated now

> I found the build process to be far more complex that it sounds.
Which part of it didn't work? I want to make it as simple as possible.

Morgan Yarbrough

unread,
Sep 8, 2013, 1:09:58 PM9/8/13
to ace-d...@googlegroups.com
Thank you!
Reply all
Reply to author
Forward
0 new messages