How do I completely disable the Sublime Text 3 snippets feature without disabling autocompletion? Having the editor "help" me with crappy pre-typed code blocks just slows me down. I'd prefer it just let me type code myself.
Use snippets to save yourself tedious typing. Snippets are smart templates that will insert text for you, adapting it to their context. To create a new snippet, select Tools | New Snippet…. Sublime Text will present you with an skeleton for a new snippet.
Tools -> Developer -> View package file -> search for the existing snippet. Change and save.
To remove Sublime Text 3 snippets is a bit cumbersome as they are stored directly in the packages. But they can be overwritten by adding a snippet with the same name in the packages
folder.
To make life a bit easier there is a package called PackageResourceViewer
available in Package Control. Install it and run PackageResourceViewer: Extract Package
. Then choose the language which snippets you want to disable. All files are now copied to your Packages
folder (a subfolder for each language). You can edit the .sublime-snippet
or .sublime-completions
files. If you simply like to disable the snippet remove all content of its file and save it. Empty files are considered as if there was no snippet.
I know this is still a bit cumbersome but the only way I know until the developer adds an option to turn snippets off.
In addition it pointed out to be important to mention, that of course it is a good idea to delete all (by PackageResourceViewer) generated files except for the ones you wish to modify. Otherwise you won't receive updates on any of these files if a package gets updated later as @Tobia pointed out in his comment.
I was trying to use Peh's answer above, but found that for Go, the snippets are encoded in XML-based .tmSnippet files. Deleting some or all of the XML resulted in annoying popups every time Sublime was launched. As a workaround, I replaced the tabTrigger
definition with uncommon characters.
Before
<key>tabTrigger</key>
<string>for</string>
After
<key>tabTrigger</key>
<string>ø</string>
This prevents the snippet from being shown in the autocomplete menu, unless you are actually using the uncommon character in question.
open your settings (like shift+cmd+p or use the menu),
add the following:
"auto_complete": false,
"auto_complete_include_snippets": false,
"auto_complete_include_snippets_when_typing": false,
Tested in ST4 build 4113.
In future versions, search for "snippet" in the default settings on the left side.
In Sublime Text Settings, you can find it on line 446
// 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": [],
I'm using Sublime Text Build 4113
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With