+2
posted by Zoran Simic, updated 1 year ago , 4
Tried disabling the auto-complete feature via the TAB key in the user keymap file, but wasn't able to do so without also disabling re-indentation with the TAB key. Is there a way to do that?

Vote

Answer

ANSWER
Rather than editing the keymap file, set the tab_completion setting to false
ANSWER
Rather than editing the keymap file, set the tab_completion setting to false
To clarify, I'm talking about these lines in the global keymap:

{ "keys": ["tab"], "command": "insert_best_completion",

 "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion",
 "args": {"default": "\t", "exact": false},
 "context": [{
  "key": "setting.tab_completion",
 "operator": "equal",
 "operand": true }] },


What I'd basically like to do is remove (or 'deactivate') those lines from the user keymap (so I don't have to keep deleting them from the global keymap). Without messing up the other lines involving "tab", like this one:

{ "keys": ["tab"], "command": "reindent", 

  ... etc ...
+1
"tab_completion": false in the user file settings works, thanks!
+1
{"tab_completion": false} didnt work for me

This workaround however works, put this line into "Key Bindings - User":
{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },


It replaces this:

// BAD: { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },

It seems to be bugged, although some admin hater claims it is ok when tab completion is ON even if you set tab_completion: false: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=7590

to make indenting selected text with TAB work, actually use this:


{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"},
  "context": [
      { "key": "text", "operator": "not_regex_contains", "operand": "\n" }
  ]
},