Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I edit snippets in Sublime Text 3?

In Sublime Text 3, how do I edit my pre-existing snippet files? Is there a way of doing this within ST?

At the time of writing, there doesn't seem to be a straightforward answer to this anywhere on the web.

like image 314
Inigo Avatar asked Dec 15 '14 20:12

Inigo


People also ask

How do I open snippets in Sublime Text 3?

Tools -> Developer -> View package file -> search for the existing snippet. Change and save.

How do I edit a snippet?

To edit an existing Snippet, click on the Pencil in the top right corner of any Snippet. A new window will pop up, where you can replace the default text or settings with something new. To save your changes, click Update. To delete a Snippet, click the Trash Can in the top right corner of that Snippet.

Where are sublime text snippets stored?

Sublime Text will present you with an skeleton for a new snippet. Snippets can be stored under any package's folder, but to keep it simple while you're learning, you can save them to your Packages/User folder.

How do I get snippets in Sublime Text?

Go to Developer Option: Go to the developer option and click on New Snippet. A file will be open with some pre-written code.


2 Answers

Custom snippets are saved in a .sublime-snippet file that you create when you first save the snippet.

By default, these are placed in the "User" package. You can either browse to the file like you would any other file, or using PackageResourceViewer: Open Resource -> User -> [name of your snippet file]

like image 85
IanVS Avatar answered Sep 17 '22 17:09

IanVS


For those of you that like a visual instruction here it is:

enter image description here

Then, you can find your snippet like this:

enter image description here

like image 22
code-8 Avatar answered Sep 17 '22 17:09

code-8