Sublime Forum

Can we opt out of Snippets from stock packages?


A lot of the stock language packages that come with Sublime have snippets in them.

For a given package, those snippets were presumably created by whoever authored the package, according to their own tastes regarding what would be cool/useful to have as snippets.

Unfortunately, I find myself hardly wanting to use any of these snippets, ever, and don’t want to have them to being constantly offered visually while typing!

Can we get a mechanism to opt out of snippets from stock packages?

1 Like


there’s no simple way to do this atm, but it is possible - see

1 Like


That linked proposal would be extremely nice as a general-purpose mechanism.



I’d like to 2nd this request. I actually replace the entire Python and C++ packages. To do this I delete the supplied packages. But with the number of updates to ST4, each time it updates I have to delete them again. It would be nice if I could just tell the system to completely ignore the whole package.



You can; there’s a setting for that:

	// List any packages to ignore here. When removing entries from this list,
	// a restart may be required if the package contains plugins.
	"ignored_packages": ["Vintage"]

Packages that are ignored are, as the name suggests, ignored. Nothing that they contain will be visible to Sublime. Note that in the case of Python and C++ (among other packages) that also makes the syntax definitions vanish away too.

If you just want to get rid of snippets and you’re using ST4, you don’t have to do either of those things because there’s a dedicated setting for this already:

	// A list of wildcard patterns specifying which snippet files to ignore.
	// For example, to ignore all the default C++ snippets, set this to
	// ["C++/*"]
	"ignored_snippets": [],

As you might expect (and have seen), when Sublime updates it updates it’s installation folder completely; that folder should be a “hands off” folder.

If you want to entirely remove a package, add it to the list of ignored_packages in your user preferences, and it’s contents will be wholly ignored whether it’s on disk or not.

You can also mask shipped packages in a “safer” way by creating an empty .zip file, renaming it to the appropriate package (say C++.sublime-package) and then dropping it into the Installed Packages folder. If a sublime-package file with the same name appears in both the install folder and Installed Packages, sublime will use the Installed Packages version.

Here “safer” is in the mysterious quotes because in doing this, you’re making sure for all time that no matter what happens in your copy of Sublime or how many times you reinstall it, you’ll never have access to the shipped package again unless you remember that you did this. You will receive 0 warning one way or the other. Confusion will likely ensue at some point in the future.

Hence, the settings are the better way to go.



I didn’t think of the ignore option. That works great. I simply needed to name my replacement packages MyC++ and MyPython to prevent them from being ignored. Thank you.



I have an update to this. I renamed my C++ and Python packages MyC++ and MyPython and added the C++ and Python packages to the ignore list. This works pretty well. I do have to close all open files to get them to recognize the new syntaxes. There is 1 issue however. The Command window apparently is hard coded to use the Python package syntax file. Now, whenever I open it I get a popup complaining that Packages/Python/Python.sublime-syntax cannot be found.



What do you mean by Command window here?