Sublime Forum

Auto completion on tab refuses to go away

#1

Since a few builds back it seems like ST2 is ignoring this setting

"auto_complete_commit_on_tab": false

…as it will always commit an auto complete suggestion when I press tab. I’ve tried setting “tab_completion” to both true and false with the same effect. I don’t know if I have unwittingly added something to the default key map, but that file is overwritten when you install a new build, right? This is what I have in the Default keymap (windows). The first line there looks a bit fishy to me. I don’t have any settings for “tab” in my user key map

[code] { “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 }
	]
},
{ "keys": "tab"], "command": "replace_completion_with_next_completion", "context":
	
		{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
		{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
	]
},
{ "keys": "tab"], "command": "reindent", "context":
	
		{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
		{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
		{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
		{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
	]
},
{ "keys": "tab"], "command": "indent", "context":
	
		{ "key": "text", "operator": "regex_contains", "operand": "\n" }
	]
},
{ "keys": "tab"], "command": "next_field", "context":
	
		{ "key": "has_next_field", "operator": "equal", "operand": true }
	]
},
{ "keys": "tab"], "command": "commit_completion", "context":
	
		{ "key": "auto_complete_visible" },
		{ "key": "setting.auto_complete_commit_on_tab" }
	]
},[/code]

So bottom line: I don’t want auto complete commit on the tab key, but I want it on the enter key. 'tis driving me nuts. :open_mouth: Can anyone help?

0 Likes

#2

You can workaround this by adding a mapping to your user key bindings file:

https://forum.sublimetext.com/t/setting-tab-completion-confusion/5964/12

0 Likes