How to edit existing VS Code Snippets

前端 未结 5 1241
渐次进展
渐次进展 2020-11-30 04:04

Is there a way to remove or edit some of the default code snippets in Visual Studio CODE ?

For example when i type req+TAB i need require not requ

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 04:38

    On my Windows installation the default/built-in JavaScript snippets are located in

    C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\javascript\snippets\javascript.json

    I renamed that snippet to "logx" (requires admin privileges to modify the file) and restarted vsCode and now have just my user "log" snippet.

    There are some threads about this on the issue tracker -

    • https://github.com/Microsoft/vscode/issues/10565
    • https://github.com/Microsoft/vscode/issues/48315

提交回复
热议问题