Sublime Forum

BUG:Pressing TAB once opens autocomplete, twice inserts word

#1

Hello,

Purchased Sublime Text 3 a while ago but I recently started having this problem. I suspect it might be caused by a plugin, but I cannot identify which (and I am unwilling to uninstall them all as I might lose my precious settings). However maybe someone will be able to help by pointing me towards a particular setting which would prevent the following behavior. Thanks in advance!

Picture me writing a long piece of HTML. The element tree gets indented quickly, so I find myself having to press the TAB key often to indent or reindent pieces of code.

**Every single time I press TAB once to indent my code, the autocompletion dropdown list appears immediately; **if I press TAB again (so as to insert a second TAB character to further indent my code), it inserts the first keyword from the autocompletion dropdown list (instead of indenting code/inserting a tab character). As a result, I cannot indent my code, I find myself having to press TAB-Escape-TAB-Escape-TAB-escape until I’m done indenting. I just cannot press TAB twice without having a random word inserted in my code.

How do you prevent the autocompletion dropdownlist from appearing when I press the TAB key?
It seems like an easy question but I’ve googled it dozens of times with different search terms and I’ve been unable to find the answer.

EDIT: I should note that I do use the TAB key to insert words from autocompletion. I just don’t want autocompletion to automatically popup when I press TAB. Does that make sense? To clarify:

  • Pressing TAB while writing code should NEVER open the autocompletion dropdown list
  • If the autocompletion dropdown list was opened by other means (eg. Ctrl+Space) in that case pressing TAB should indeed insert the selected word in the autocompletion dropdown list. That’s how I’ve always had it, until, well, something random happened.

Thank you for helping a poor soul !
Costello

0 Likes

#2

Just in case I haven’t explained myself clearly enough, this is what happens:

Step 1: I’m writing some code… (regardless of language – CSS, PHP, Javascript, what have you)

Step 2: press TAB, the autocompletion appears

Step 3: press TAB again, shit gets in my code

I am often in situations where I need to press TAB multiple times to position the cursor somewhere specific (OK the example on the screenshot was bad, but it happens even if the cursor is on the first character of the line).

  • Step 2 should NOT be happening (autocompletion shouldn’t appear when I press TAB)
  • Step 3 is happening as intended (Sublime Text inserts whatever word is selected in the autocompletion list)

I am being extra specific here because during all of my google searches on the subject I’ve found so much vocabulary around the subject and settings that didn’t solve my problem. Thanks in advance!

0 Likes

#3

I had the same problem and I found it is caused by SublimeCodeIntel. Disabling it on HTML files solved the problem to my satisfaction.

Look for the setting “codeintel_enabled_languages”: and remove HTML from the list.

0 Likes