A jQuery Plugin Snippet for Sublime Text 2

You can simply (yes really simply) create a code snippet on Sublime Text 2 for faster code completion by clicking on the Tools -> New Snippet  menu of sublime and by editing the snippet template according to your choice.
You will have to edit/update line number 3 to the code block you want to have while calling the snippet by a shortcode. Uncomment line 6 & define a shortcode typing which you want to generate that code block.  Also uncomment line 8 and define whether you want that snippet to be workable only in a specific scope of scripting.

Finally save the file in /Users/USERNAME/Library/Application\ Support/Sublime\ Text\ 2/Packages/User  (Mac OSX) folder with a name along with .sublime-snippet extension.

Screen Shot 2013-08-29 at 4.26.04 PM

Here I have made a simple snippet which contains a template of a basic JQuery plugin. You can Download this snippet file and paste it inside the folder /Users/USERNAME/Library/Application\ Support/Sublime\ Text\ 2/Packages/User (Mac OSX)

Screen Shot 2013-08-29 at 4.12.36 PMThen you can start writing jquery on any type of file (As I did not define any scope) and the snippet keyword should appear.

Screen Shot 2013-08-29 at 4.14.14 PM

Press tab key by typing jqueryplugin OR enter/return key by selecting that suggestion and it will generate a basic template of a jquery plugin there for you.

Screen Shot 2013-08-29 at 4.14.22 PM