Home Download Buy Blog Forum Support

relative indentation on pasting and snipppet $SELECTION

Re: relative indentation on pasting and snipppet $SELECTION

Postby jps on Sat Apr 19, 2008 5:46 am

$PARAM1, $PARAMA etc are available when a snippet is expanded, they correspond to extra parameters passed to the insertSnippet and insertInlineSnippet commands. E.g., binding a key to:

Code: Select all
insertSnippet foo.sublime-snippet "hello, world!" "1234"


Would expand foo.sublime-snippet, with $PARAM1 evaluating to "hello, world" and $PARAM2 expanding to 1234.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: relative indentation on pasting and snipppet $SELECTION

Postby jps on Sat Apr 19, 2008 5:59 am

Looks good to me... it won't work entirely correctly if spaces and tabs are mixed inconsistently across lines in the clipboard, but that's certainly not worth worrying about.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Previous

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests