Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set markdown snippet trigger automatically

According to the official document, https://code.visualstudio.com/docs/languages/markdown

Snippets for Markdown

There are several built-in Markdown snippets included in VS Code - press Ctrl+Space (Trigger Suggest) and you get a context specific list of suggestions.

Does there any way, trigger snippet automatically when I type word, because it's troublesome, press Ctrl+Space

like image 712
Miles Avatar asked Apr 26 '17 16:04

Miles


2 Answers

Try setting:

"[markdown]": {
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  },
},

This enables IntelliSense automatically when you start typing. By default, this will show snippets and word based suggestions (suggestions based on words in the current document). To disable word based suggestions, set:

"[markdown]": {
    "editor.quickSuggestions": true,
    "editor.wordBasedSuggestions": false
}

You can also set:

"editor.snippetSuggestions": "top"

If you always want snippets to show before word base suggestions

like image 169
Matt Bierner Avatar answered Sep 19 '22 23:09

Matt Bierner


There is an inconsistency in VS Code and it is a known issue. Markdown snippets do not get auto-completion. Probably it will be fixed in next release.

Yes this is an inconsistency. Full extensions get auto (7x24) completion by default (e.g. latex, cake), some built-in extensions like Markdown do not.

https://github.com/Microsoft/vscode/issues/1617#issuecomment-166999086

like image 45
Shantanu Roy Avatar answered Sep 19 '22 23:09

Shantanu Roy