5

When I first select a choice with the Tab key from the list of choices, the autocomplete choice is not committed, when I come back and try again, it works.

Why does it work the second time and fail the first time?

Ideally, I would like the choice to commit an autocomplete choice with either, the Enter / Return key or the Tab key. Is that possible?

"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_commit_trigger_characters":
[
    ".",
    "Enter",
    "Tab"
],
"auto_complete_delay": 50,
"auto_complete_selector": "source, comment, text.plain",
"auto_complete_size_limit": 4194304,
"auto_complete_with_fields": true,
"auto_find_in_selection": true,
"auto_complete_triggers":
[
    {
        "characters": "<",
        "selector": "text.html"
    }
],
"tab_completion": false,

1 Answer 1

4

Remembering Autocomplete Choice

The autocomplete is quite elaborate; when you choice to insert "program" when you have entered "pro", the selection will be different when, for instance, you have autocomplete after typing "pr".

Use Tab or Enter to Commit Auto Complete Selection

Use the following setting:

{ "auto_complete_commit_on_tab": false }

Auto completion will commit selection with either tab or enter.

Add Auto Complete Commit Keys:

Thanks to this web-page: https://sublimetext.userecho.com/communities/1/topics/4670-allow-setting-which-keys-commit-auto-complete for including instructions on how to add key-bindings so that you can commit auto-completion with more keys.

For example: commit auto complete selection with period:

{ "keys": ["."], "command": "commit_completion", "context": [{ "key": "auto_complete_visible" }, { "key": "setting.auto_complete_commit_on_tab", "operand": false }] }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .