Sublime Forum

ESC key for a different kind of auto completion

#1

In textmate if you hit ESC it auto completes using words already in the current doc and you can cycle through them by hitting ESC again.

If there a way to set this up in sublime? It’s the only hangup I have with the editor, since tab auto complete decides to complete from the language BEFORE trying words in the current doc.

0 Likes

#2

I got really used to TextMate’s Esc behavior also. It’s amazing how often you need a word that’s close by in the same document, and the first letter plus a few taps of Esc worked great.

My adapted behavior is to just be a bit more verbose to get ST2’s tab complete to find what I want (e.g. to match ActiveNav I do something like Ana[tab]) – but I often end up with the common complaint of an obscure PHP function (e.g. an[tab] gave me apache_note(note_name) … err).

0 Likes

#3

Agreed. It need to check the document for completions first before diving into the current documents language api

0 Likes

#4

Couldn’t find this elsewhere-- once you hit tab to autocomplete, if it guesses incorrectly, how do you cycle through other choices or back out of it?

0 Likes

#5

ctrl+space

0 Likes

#6

Sweet, thanks.

0 Likes

#7

There is a Sublime Text plugin available that adds TextMate style ‘Esc’ completion:

github.com/alexstaubo/sublime_t … completion

Helped my switch over immensely :smile:

0 Likes