There's an external command I'm using constantly - basically launching a batch file. I'd like to put a toolbar button (and possibly keyboard shortcut) for this into the IDE. Is there an easy way to do that?
In the Solution Explorer, right-click the project node and select Add > New Item. In the Add New Item dialog, go to Visual C# > Extensibility and select Command. In the Name field at the bottom of the window, change the command file name to FirstCommand.
Command Palette# VS Code is equally accessible from the keyboard. The most important key combination to know is Ctrl+Shift+P, which brings up the Command Palette. From here, you have access to all of the functionality of VS Code, including keyboard shortcuts for the most common operations.
First, add an item to your Tools menu by choosing Tools, External Tools, and filling out the dialog, like this:
Then bring up Tools Customize, click the Keyboard button at the bottom, and find the appropriate external tool number:
All the configured external commands in VS are available to add to a Toolbar or Menu through the Tools>Customize menu as "External Command ##". You just need to know which number corresponds to the particular command you've configured. I believe it is in order of entry in the external commands list.
Similarly, you can find those names in the commands list in Options>Environment>Keyboard and assign a shortcut to your command that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With