Visual Studio Code Snippets in Source Control

Viewed 221

I would like to check a vscode typescript react snippet file into source code so that these can be distributed to developers.

At the moment, I'm editing a global snippet file under -[user]/AppData/Romaing/Code/Snippets/typescriptreact.json - so this works great for me locally. It would be even better if I could check this into my application code.

Any suggestions are appreciated -

Cheers

1 Answers

You can check-in a .vscode/{filename}.code-snippets file which is interpreted as a JSON file. This can be used to define multi-language user-defined snippets. VSCode has documented it here.

Related