Sublime Forum

Snippets - Context Dependent Variables

#1

I’m working on some snippets and I keep running into Context Dependent Variables that appear to be holdovers from TextMate. For example, TM_RAILS_TEMPLATE_END_RUBY_BLOCK and TM_PHP_OPEN_TAG. Where are these defined? In TextMate, this is part of the Bundle Editor, http://manual.macromates.com/en/environment_variables.html. I’m really just looking for a decent list of the variables available to me when working with snippets.

0 Likes

#2

docs.sublimetext.info/en/latest/ … -variables

0 Likes

#3

Thanks for the link, although, I’m not specifically talking about Environmental Variables like TM_FILENAME or SELECTION. If you check out the TextMate doc page I linked to there is a section (9.3) on Contect Dependent Variables and how you can edit/view them using the Bundle Editor. These are usually language dependent variables. There isn’t a .sublime-options file in /Packages/PHP/ that lists out what these vars are defined as. Basically, if you check out /Packages/PHP/php-else.sublime-snippet you’ll see that this standard snippet is using the TM_PHP_OPEN_TAG variable to add “php” in <?php else: ?>. Those are vars I’m looking for.

0 Likes

#4

Maybe this thread can be of assistance.

0 Likes