31

I've been using Sublime text 2 for the past few days, and I have to say it's been amazing!

I have added many snippets already, but can't figure out how to edit Sublime's default snippets like the script element (script+tab).

In my opinion the script element shouldn't have a type attribute in HTML5, so I'd like to edit that snippet.

Problem is, I can't find it in the /Packages/User folder like the user defined snippets.

Any help would be appreciated!

2 Answers 2

28

For this its in Packages/HTML/HTML.sublime-completions. To find this kind of stuff all you have to do is do a find anything (Ctrl+Shift+F on linux, don't know for mac..) then bung the sublime folder in the where field and search away!

Sign up to request clarification or add additional context in comments.

5 Comments

To avoid your changes being over-written by Sublime or package updates, copy the file to your Packages/User folder first, and edit that rather than the original.
@JeremyHalliwell - I tried doing that - but Sublime seems to still use the original default snippet?
On a Mac, the full path to the Packages folder is ~/Library/Application Support/Sublime Text 2/Packages
The packages folder doesn't exist on Sublime Text 3. Do you know how to change this in ST3?
Sorry, never its there, but it doesn't have the default packages
17

Mac Answer

Go in the menu:
Sublime Text 2 -> Preferences -> Browse Packages...
Than open the HTML folder.
Double click on html_completions.py
Search for script and edit the value.

Hope this help someone.

2 Comments

I've been looking for this for a long time, thank you
wanted to delete a snippet I created, but couldn't find it anywhere. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.