How to add User Snippets to VS CODE and SUBLiME TEXT

  

For VS code :

  1. Go to this website - snippet generator

      2.Paste your code (to be made into snippet)on left .

  1. Include $1,$2,$3 for switching of positions when you press the tab button .

     4.Write the name of the snippet (with which you want to call ) in the TAB TRIGGER

     5.Copy the snippet

    6.VS CODE —> File —> Preference —> User Snippet —>New Snippet →Type name of snippet ----->Enter—>Paste the copied snippet (within the two BRACES)

For Sublime Text :

  1. Go to this website -snippet generator

      2.Paste your code (to be made into snippet)on left .

  1. Include $1,$2,$3 for switching of positions when you press the tab button .

     4.Write the name of the snippet (with which you want to call ) in the TAB TRIGGER

     5.Copy the snippet

     6.SUBLIME TEXT —> Tools—> Developer—> New Snippet —>Remove everything and Paste the copied snippet —>Save(snippet_name.sublime-snippet must be the extension of the saved file )

Comments