How to Create Sublime Text Snippets
Created on July 4th, 2015
Creating sublime text snippets is super easy & it can come in really handy. In this quick video we'll show you how to start creating your own sublime text snippets. In order to create a new snippet you will need to:
- Open up Sublime Text
- Goto Tools->New Snippet
- Modify the contents inside of the block
- Enable your tab trigger
- Save the file as filename.sublime-snippet
- In a new file type in the tab trigger name and press tab!
Here is an example snippet that get's generated when you click on Tools->New Snippet:
<snippet>
<content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
So, go and make your own sublime text snippets and save yourself some time and impress some friends :P
Comments (0)