Sublime Forum

Unpredictable Tab Movement

#1

I have started seeing some strange behavior when expanding snippets, zen coding, or other built-in tab completions.

If the cursor is between an existing HTML tag, and I attempt to insert a new snippet or other tab completion, pressing Tab starts moving the cursor to different lines and does not expand my item. For example:

((cursor inside of H1 tag))

php

((cursor at end of php keyword, TAB is pressed))

php

((cursor now on a different line above or below, php does not expand to <?php ?> as expected... I have to move the cursor back manually and hit tab again several times to get the item to expand, with the cursor moving to a different place each time))
0 Likes

#2

Most likely that’s because

is a snippet like

$1

$0. So when you are at the $1 position and press tab, the cursor jumps to $0 (which is last position).
Long story short, you just have to press ESC after you type php.
0 Likes

#3

ESC for the win. Thanks friendo.

0 Likes