Assign code snippet to keyboard shortcut in Visual Studio

前端 未结 4 786
野趣味
野趣味 2021-02-02 10:33

Anyone knows how to assign key shortcut to specific code snippet?

I would like to assign for instance CTRL+K,CTRL+J to a #region snippet.

4条回答
  •  感动是毒
    2021-02-02 11:27

    I think you may want to try adding a tag inside your MySnippet.snippet file

    Square Root Myself Calculates the square root of 16. sqrt

    For details check out : https://docs.microsoft.com/en-us/visualstudio/ide/walkthrough-creating-a-code-snippet?view=vs-2019#description-and-shortcut-fields

    To add a shortcut, add a Shortcut element within the Header element

提交回复
热议问题