From the course: Visual Studio Code: Building an Extension

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a code snippet

Creating a code snippet - Visual Studio Code Tutorial

From the course: Visual Studio Code: Building an Extension

Start my 1-month free trial

Creating a code snippet

- [Instructor] Now let's talk about another type of useful addition that you can make to Visual Studio Code that doesn't require a ton of scripting, and that's Code Snippets. Now these can be easily converted into Extension, but I'm just going to talk about the Snippets themselves in this video. Snippets are just shortcuts that makes it easier to work with code by allowing you to automatically bring in and paste some code that you're going to use often. Now the Visual Studio Code version of Snippets are based on a format from an older text editor called TextMate, but they get stored in Visual Studio Code in the json format. Now it's easier even when you're making extensions out of these, to play with them locally first. So we're going to do that in just a minute, but first I want to talk about the format itself. This is what it looks like. You create an identifier, and that's just the name of the Snippet that you're going to…

Contents