0

How to auto complete custom snippets in plain text mode?

Henry Huang fa 11 anys updated by Nicolas fa 10 anys 1

I tried setting

"auto_complete_selector": "text, source - comment"

in the user profile, but once that's enabled, I can see the snippet everywhere, even when I am using other syntax specific file. I just want to limit the snippet to be auto completed in plain text mode, how do I do that?

Create a .sublime-snippet file in Packages/User/ with the following content:


<snippet>
    <content>Laughing out Loud</content>
    <tabTrigger>LOL</tabTrigger>
    <scope>text.plain</scope>
    <description>Saying LOL</description>
</snippet>
If you need it for other scopes e.g. Markdown you can find out the current scope name by opening the console and typ view.scope_name(0)