25

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?

Billy ONeal
  • 104,103
  • 58
  • 317
  • 552
  • Here is a blog post I wrote on that. It's integrating Subversion: http://gbdarren.blogspot.com/2014/07/adding-tortoisesvn-commands-to-visual.html – Darren Griffith Nov 03 '16 at 19:41

2 Answers2

41

First, add an item to your Tools menu by choosing Tools, External Tools, and filling out the dialog, like this:

enter image description here

Then bring up Tools Customize, click the Keyboard button at the bottom, and find the appropriate external tool number:

bind to a key

T.Todua
  • 53,146
  • 19
  • 236
  • 237
Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
  • 1
    You lost me at "and find the appropriate external tool number" What does this mean, and how do we know which one is appropriate? – Adam Grant Sep 24 '13 at 14:07
  • 4
    count them - in my screenshot Create GUID is 1, and so on until Spy++ is 5 and the new command is 6 – Kate Gregory Sep 24 '13 at 14:23
  • @KateGregory Answer updated, and now is correct. we can delete comments. – T.Todua Mar 11 '19 at 11:53
  • since the screenshot doesn't include the bound command, you made it worse, not better @T.Todua – Kate Gregory Mar 11 '19 at 12:10
  • @KateGregory How i made it worse, i cant understand what you say. I havent removed anything existing from previous screenshot, what could be valuable. Could you modify & specify what you mean? – T.Todua Mar 11 '19 at 12:12
4

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.

bronsoja
  • 799
  • 4
  • 8
  • 1
    +1 -- but How do I configure what these external commands are? – Billy ONeal Jun 20 '11 at 17:33
  • Yes, I think you're missing some steps here. – Adam Grant Sep 24 '13 at 14:08
  • 2
    Note they can be added to context menus as well: 1. Tools>Customize->Commands->Context menu 2. Choose the context menu you want 3. Click "Add Command" 4. The external commands will appear in the "Tools" category as "External Command X" – Ohad Schneider Dec 18 '13 at 13:07