Home Download Buy Blog Forum Support

Snippets documentation?

Snippets documentation?

Postby willi297 on Wed Sep 08, 2010 1:57 pm

Jon,

First, I was specifically looking to see if I could use the same vars available in builder (i.e. $BaseName, $FileName, etc...) in a snippet. It appears not.

In my quest, I went to: http://www.sublimetext.com/docs/snippets, which is the URL in a auto-generated snippet. This page is not yet populated. Would be nice to have a little consolidated docs on snippets. I can take a stab at content ideas if you'd like of even help contribute.

Lemme know...

Greg
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA

Re: Snippets documentation?

Postby jps on Fri Sep 10, 2010 11:12 pm

If you're keen to contribute some docs, that'd be great.

For reference, the supported variables are:

SELECTION (the current selection when the snippet was triggered)
PARAM1, PARAM2, etc (arguments passed to the insertSnippet command)
TM_SELECTED_TEXT
TM_LINE_INDEX
TM_LINE_NUMBER
TM_FILEPATH
TM_FILENAME
TM_CURRENT_WORD
TM_CURRENT_LINE
TM_FULLNAME
TM_TAB_SIZE
TM_SOFT_TABS
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Snippets documentation?

Postby darren_n on Wed Nov 23, 2011 2:31 pm

Where do I set variables like TM_FULLNAME? I cannot find anything anywhere on this for Sublime Text 2.

Thanks
darren_n
 
Posts: 3
Joined: Tue Jul 19, 2011 1:27 pm

Re: Snippets documentation?

Postby spadgos on Thu Nov 24, 2011 3:14 pm

You don't set them.. they're already set for you
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests