How to automatically expand snippets without opening suggestion window in VS Code?

Viewed 1160

I've installed VS Code extension named dsznajder.es7-react-js-snippets to quickly type boilerplate ES7 code.

So when I type imd a quick suggestion shows up enter image description here

and then by pressing Tab this snippet expands enter image description here

I want to get the following behavior:

  1. Disable Quick Suggestion so it will not be showed up automatically
  2. Create keyboard shortcut which, after I typed imd, and called shortcut will expand snippet automatically (without showing suggestion / autocompletion windows and needing to navigate to snippet)

How would I do that?

2 Answers

Add the following to your user settings:

{
  "editor.tabCompletion": true,
  "editor.quickSuggestions": {
    "other": false,
    "comments": false,
    "strings": false
  }
}

See:

// Control whether an active snippet prevents quick suggestions.

   "editor.suggest.snippetsPreventQuickSuggestions": false,

so suggestions do not intrude while completing a snippet.

Related