Home Download Buy Blog Forum Support

Tab/Shift+Tab behaviour in snippet

Tab/Shift+Tab behaviour in snippet

Postby lumpysimon on Tue Nov 30, 2010 5:06 pm

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: Select all
<snippet>
   <content><![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...}

?>]]></content>
    <tabTrigger>wpplugin</tabTrigger>
    <scope>text.html - source.php</scope>
    <description>WordPress Plugin Template</description>
</snippet>


Thanks
Simon
lumpysimon
 
Posts: 2
Joined: Tue Mar 30, 2010 9:00 pm

Re: Tab/Shift+Tab behaviour in snippet

Postby gpfsmurf on Tue Nov 30, 2010 7:34 pm

Have you tried pressing Escape or an arrow key?
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm


Re: Tab/Shift+Tab behaviour in snippet

Postby lumpysimon on Wed Dec 01, 2010 4:20 pm

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

cheers
simon
lumpysimon
 
Posts: 2
Joined: Tue Mar 30, 2010 9:00 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests