atombender / sublime_text_alternative_autocompletion

Adds TextMate-like autocompletion to Sublime Text 2 and 3.
MIT License
147 stars 23 forks source link

Conflicts with ST autocomplete popup when using tab as completion key #23

Open GorgeRonde opened 10 years ago

GorgeRonde commented 10 years ago

Pre-requisites :

Steps to reproduce the issue:

afunctionname
anotherfunctionname
athirdfunctionname

Expected result : pressing tab should commit afunctionname (at least if we stick to the auto_complete_on_tab logic).

Observed result : athirdfunctionname gets commited instead, since it is closer to the cursor.

Workaround : edit Tabs.sublime-keymap/your user keymap to

{
    "keys": ["tab"],
    "command": "alternative_autocomplete",
    "args": {"default": "\t"},
    "context": [
      { "key": "num_selections", "operator": "equal", "operand": 1 },
      { "key": "auto_complete_visible", "operator": "equal", "operand": false}
    ]
},