Skip to content

Instantly share code, notes, and snippets.

@danpe
Created October 15, 2013 18:56
Show Gist options
  • Save danpe/6996806 to your computer and use it in GitHub Desktop.
Save danpe/6996806 to your computer and use it in GitHub Desktop.
Sublime Text 3 Environment Variables
List of all Sublime Text 3 Environment Variables to be used by Snippet Makers / Plugin Developers
$SELECTION The text that was selected when the snippet was triggered.
$TM_CURRENT_LINE Content of the line the cursor was in when the snippet was triggered.
$TM_CURRENT_WORD Current word under the cursor when the snippet was triggered.
$TM_FILENAME File name of the file being edited including extension.
$TM_FILEPATH File path to the file being edited.
$TM_FULLNAME User’s user name.
$TM_LINE_INDEX Column the snippet is being inserted at, 0 based.
$TM_LINE_NUMBER Row the snippet is being inserted at, 1 based.
$TM_SELECTED_TEXT An alias for $SELECTION.
$TM_SOFT_TABS YES if translate_tabs_to_spaces is true, otherwise NO.
$TM_TAB_SIZE Spaces per-tab (controlled by the tab_size option).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment