Sublime Forum

Where is Sublime finding its autocomplete snippets from, and how to disable them?

#1

There’s a feature in Sublime where when I type the following in a .d file:

con

And I press tab, it autocompletes to: static immutable type name = value;. I don’t want these snippets, I only want autocomplete to work on symbols that it finds in my codebase.

Is there a way to disable this?

0 Likes

#2

All snippets that are valid for your current source selector (source.c, source.python, etc) can be found if you go to the menu and select Tools >> Snippets. I checked the default D package (in Windows you can find it at C:\Program Files\Sublime Text 3\Packages) and in that package there is a snippet named constant that uses the con as a shortcut. So this is basic behavior and not part of an installed package.

To alter this, I would recommend getting the addon PackageResourceViewer. This gives you the ability to go into any currently loaded package through the quick bar, open a resource, and then edit it. When you do this (say for instance, you wanted to make it such that you needed to type constant instead of con) you are able to save this and it will override the default behavior for this snippet.

Hope that helps.

0 Likes