I tried some solutions, there are not perfect. There is a worked solution: [SOLVED] ST3: “tab_completion”: false does not work,
but now I want to provide mine (inspired by this link ↑, thanks for @OdatNurd).
1. Preferences -> Key Bindings
2. Search '"keys": ["tab"]' at left window, then you get a group of result. It's look like this for me:
{ "keys": ["tab"], "command": "auto_complete", "args": {"mini": true, "default": "\t"},
"context":
[
{ "key": "auto_complete_visible", "operand": false },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*\\w", "match_all": true },
]
},
{ "keys": ["tab"], "command": "expand_snippet", "context":
[{ "key": "has_snippet" }, ]
},
{ "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": "move", "args": {"by": "lines", "forward": true}, "context":
[
{ "key": "overlay_has_focus", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[{ "key": "has_next_field", "operator": "equal", "operand": true }]
},
{ "keys": ["tab"], "command": "commit_completion", "context":
[{ "key": "auto_complete_visible" }]
},
(I don't want to imply what it should look like, because different sublime versions will have different settings.)
3. COPY them all into the right window.
4. DELETE (or just Comment Out) both "auto_complete" block and "commit_completion" block at right the window, and don't change anything else. Now, my User Keybindings like this:
// Disable all autocompletion and tab completion. This overrides the default
// binding for this key.
{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },
// { "keys": ["tab"], "command": "auto_complete", "args": {"mini": true, "default": "\t"},
// "context":
// [
// { "key": "auto_complete_visible", "operand": false },
// { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
// { "key": "setting.tab_completion", "operator": "equal", "operand": true },
// { "key": "preceding_text", "operator": "regex_match", "operand": ".*\\w", "match_all": true },
// ]
// },
{ "keys": ["tab"], "command": "expand_snippet", "context":
[{ "key": "has_snippet" }, ]
},
{ "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": "move", "args": {"by": "lines", "forward": true}, "context":
[
{ "key": "overlay_has_focus", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[{ "key": "has_next_field", "operator": "equal", "operand": true }]
},
// { "keys": ["tab"], "command": "commit_completion", "context":
// [{ "key": "auto_complete_visible" }]
// },
- Enjoy it . This solution won't break the snippets index, and you can commit completion with
enter
.