Sublime Forum

How to override default completions?

#1

I have defined a custom completion file for Markdown with the intention that h1 etc. will expand to # <cursor> #:

[code]{

"scope": "text.html.markdown",

"completions": 

    { "trigger": "h1", "contents": "# $0 #" }, 
    { "trigger": "h2", "contents": "## $0 ##" },
    { "trigger": "h3", "contents": "### $0 ###" },
    { "trigger": "h4", "contents": "#### $0 ####" },
    { "trigger": "h5", "contents": "##### $0 #####" },
    { "trigger": "h6", "contents": "###### $0 ######" }

]

}[/code]

The file is saved as Packages/User/Markdown.sublime-completions. The problem is that Markdown also uses the HTML completions, which already include triggers for h1 etc. and which take priority over my own custom completions. I know I can press ctrl+space and cycle through them, but it is not as convenient as just typing h1+tab. Is there any way of overriding or disabling the default completions when I have defined my own?

0 Likes