Sublime Forum

ST3 - JS Snippet File Location

#1

Hi all, I have ST3 and I just created a JS snippet. I’m on a MAC and saved the snippet file in the ~/Library/Application Support/Sublime Text 3/Packages/User/snippet/Javascript directory. I then closed and restart the application. The snippet TRIGGER and snippet are NOT found.

Can someone please tell where I’m suppose to save this file so that the editor will pick up when I’m in a JS file?

Thanks,
Drew Nathanson

0 Likes

#2

The path looks correct at first blush; if you’re not sure where to put it, Tools > Developer > New Snippet..., put the content in there, and when you save Sublime will offer the correct location by default. You can also find your User package by using Preferences > Browse Packages.

Note also that you don’t need to restart Sublime for it to see the snippet.

Based on your problem description:

  • Are you sure the snippet is in an appropriate XML format? Do you see any errors in the Sublime console when you save it?
  • Does it have an extension of sublime-snippet so that Sublime knows what it is?
0 Likes

#3

Thanks for the response. I re-created the snippet and let it default to the directory. I needed to update the extension (as there was NONE) from the ‘New Snippet’ tab. Once I did that, it now appears. Really strange but as long as it works, I’m happy.

Again, thanks.
-Drew

1 Like