Sublime Forum

How to find snippet location?

#1
  1. Tools > Snippets…
  2. Ctrl+Shift+P > type “mysnippet” name

Actions above just insert a snippet.
But how to get a location of a snippet?

ST3
Windows 10 64

0 Likes

#2

Most snippets are packed in packages…

If you create them, then they should appear in ( no quotes - plop it into Explorer and it’ll take you Win10 to “C:\Users%UserName%\AppData\Roaming\Sublime Text 3\Packages” [ Also usable in explorer without quotes ] )…
“%AppData%\Sublime Text 3\Packages”

Either in the folder name of the language or extension you’re using, or in the User\ folder in the root, or in a nested folder…

I highly suggest creating your own folder in Packages\ and creating a snippets folder and creating them by hand so you know where they are and to make easy backups… Most of the tools I’ve found have been more annoying to use than simply making them yourself and once you have an established snippet collection, then you really don’t use them that much anymore ( the tools )

0 Likes

#3

View menu -> Show Console:

sublime.find_resources('*.sublime-snippet') Enter

ofc you can change the glob to mysnippet if the name of the file is mysnippet, otherwise you might have to parse out the XML descriptions from the snippets to find it more quickly

3 Likes