title: VSCode: Assign key command to a snippet?
body: <p>In previous editors I've users, notably SublimeText and Atom, I was able to create a simple command to add a character like <code>&amp;nbsp;</code> when I type <code>option-space</code>.</p>
  
  <p>In Atom, for example, I created the command in <code>init.coffee</code>:</p>
  
  <pre><code>atom.commands.add 'atom-text-editor',
   'editor:insert-nbsp': (event) -&gt;
     editor = @getModel()
     editor.insertText('&amp;nbsp;')
  </code></pre>
  
  <p>and then the easy part, a keybinding to call the custom command:</p>
  
  <pre><code>  'alt-enter': 'editor:insert-br'
  </code></pre>
  
  <p>In vscode, I know how to do the latter (create a keybinding) but how to create the command. </p>
  
  <p>I realize I can create a snippet, which I have made several of, but I want to essentially trigger the <code>&amp;nbsp;</code> snippet with a keybinding.</p>
  
  <p>How can I do this?</p>