Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
559 views
in Technique[技术] by (71.8m points)

sublimetext - How do I disable snippets in Sublime Text 3?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...