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.

Adding multiple commands

Adding multiple commands - Visual Studio Code Tutorial

From the course: Visual Studio Code: Building an Extension

Start my 1-month free trial

Adding multiple commands

- [Narrator] So let's see what it's like to add a separate command. So, right now we have a command for doing something and I want to add another one right here. So I'm going to start off by identifying another activation event. So I'll use the on command activation event, and then I'm going to do something called open terminal. So I'll define that in my JavaScript files, and then I'm going to add another command to my contribution points, so I'll need to make a copy of this. And let's put a comma right here. And for this command, I'm going to use open terminal and I'm just going to call this open a terminal. Alright, so, that's all I need to do right here. Let's go ahead and save this and then we'll go to scripts.js and we will add an additional command here. So we'll start off after this subscriptions push here and we will create a new variable. Let's go ahead and do a new variable called terminal. This is going to register…

Contents