Sublime Forum

Tab/Shift+Tab behaviour in snippet

#1

I’ve written a snippet with several fields in it to tab through. When I’ve entered the last one, I would like the Tab and Shift+Tab keys to return to their usual indent/unindent roles.

However, they seem to get stuck in their next/previous field roles and I can’t seem to break them out of this. My snippet is below, if you tab through the fields then enter some code, then select a line and press Shift+Tab it jumps back to the field, rather than unindenting the line. Can anyone see if I’m doing something wrong?

[code]
<![CDATA[<?${TM_PHP_OPEN_TAG:php}
/*
Plugin Name: ${1:Plugin Name}
Plugin URI: http://$2
Description: ${3:Description}
Version: ${4:0.1}
Author: ${5:Author}
Author URI: http://$6
*/

${0:# beautiful code…}

?>]]>
wpplugin
text.html - source.php
WordPress Plugin Template

[/code]

Thanks
Simon

0 Likes

#2

Have you tried pressing Escape or an arrow key?

0 Likes

#3

More info about snippets:

sublimetext.info/docs/extens … ppets.html
sublimetext.info/docs/refere … ppets.html

0 Likes

#4

thanks very much, hitting the escape key does the trick.

cheers
simon

0 Likes