2

I've created my own custom version of the html.sublime-snippet adding in a doctype and some meta tags and saved it in the User directory.
Now, when when I try to trigger my snippet both the default version and my custom version show up as options.
Is there any way to semi-permanently disable the default snippet so only my version is available?

2 Answers 2

3

I was bothered by Python's default snippet for @property. I found working solution here. Your would be similar:

  • In .config/sublime-text-2/Packages copy the HTML folder to (for example) HTML Customized.
  • Hose/Edit out the snippets that offend you in HTML Customized.
  • Add HTML to the ignored_packages entry in the preferences to disable the standard HTML snippets.

Without catch!

Someone called marcuso posted this solution on Sublime Text forum. He deserves all glory. (And also Matt York, who mentioned the thread in this comment).

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

Comments

1

Options:

  1. You can change the tabTrigger of your new snippet
  2. You can change the tabTrigger of the default snippet
  3. You can comment out the tabTrigger line of the default snippet:

    <!-- <tabTrigger>html</tabTrigger> -->

The catch: when you update ST I believe it will overwrite any changes made to the default configuration files. So, if you comment out the tabTrigger in the default snippet it will be uncommented after your next upgrade of ST.

3 Comments

Thanks for the answer however none of these options are perfect. I know there's a way to 'ignore_packages' in the preferences, if only there was a way to ignore a snippet. If there are no other answers I'll accept yours and go with option 1.
Looks like you're not the only one with this problem. There is also a feature request on ST2's userecho. I added my upvote; you should too!
Yeah I saw that question on the Sublime forum but thought I'd ask here since no one had replied to him.

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.