Home Download Buy Blog Forum Support

How to override default completions?

How to override default completions?

Postby johncastlegate on Fri Aug 15, 2014 10:23 am

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

Code: Select all
{

    "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 ######" }

    ]

}


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?
johncastlegate
 
Posts: 1
Joined: Fri Aug 15, 2014 10:11 am

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 11 guests