To create a snippet in Sublime Text you save it with a file extension of .sublime-snippet in the Packages folder (/Users/yourname/Library/Application Support/Sublime Text 3/Packages/User on a Mac).
Quick Tip: You can use the shortcut Cmd+Shift+G and paste ~/Library/Application Support/Sublime Text 3/Packages/User to open the folder.
For every snippet that you want to add, you create a new file.
Create a file called grunt.sublime-snippet in the packages folder. Add the following to it:
Save the file and restart Sublime. Now whenever you type grunt and press Tab, it’ll insert the initial Grunt config code for you. Let’s add some more snippets for common plugins. You should of course edit the following template code with your own preferences. Add them in their respective name.sublime-snippet files in the Packages fodler.
Here is a bash script to add all grunt snippet files in one go. Open a Terminal and go to the folder you downloaed the script in. For example: cd ~/Downloads to go to the downloads folder. Run the script by typing bash grunt-snippets.sh. It will add all the above snippets to the packages folder.