I find I go to the My Work pane inside the Team Explorer frequently, but I haven't found a way to get there in one click. I can create a shortcut key for the command TeamFoundationContextMenus.Commands.GoToMyWork and that works, but I'm looking for something I can click on a toolbar.
So specifically, my question is: where in the toolbar customization "Add Command" list does this option exist? There are several categories and many items in each, and I haven't found a way to search, only scroll.
More generally, and if the option doesn't exist, is there a way to use the command name in the keyboard shortcut customization to create a toolbar button for that command?
For a toolbar you can add commands only from the existing VS menu.
For additional commands, you can create an intermediate Visual Commander command DTE.ExecuteCommand("TeamFoundationContextMenus.Commands.GoToMyWork") and then add this VCmd.Command01 command to a toolbar.
Related
If I right-click on the toolbar > click Customize > click Commands tab > then click the Context Menu radio button, there are a rather large amount of choices. Sometimes what I'm trying to find an item to add or remove, I have to wade through a lot of the choices before I finally find the item and looking for (if I even can). Sometimes the groups are not at all intuitive.
Is there any way I can search the available options in all categories? In Visual Studio itself, or even an extension.
Two options I use:
If you're trying to search for something specific, Quick Launch
should be pretty useful to you. CTRL+Q will take you to it or just
type in the text box in the top right of the main VS window.
Another option that comes to mind: go to Tools->Customize and click
on the Keyboard button. That has a search box for commands that
can also be useful. Tip: make the window bigger to make the list
larger.
I'm trying to build an extension to Visual Studio with a couple of custom commands. It is well documented how to add commands to VS Menu/Toolbars. There are also many samples how to add custom button to the Project Explorer Toolbar. The problem is that best (most suitable) toolbar for my command is those on the top of Output Window.
So, there are two questions:
Is it possible?
If yes then how to achieve this?
1) It is really possible. It looks like any toolbar and any menu could be extended by any command.
2) The method of extending is the same for all toolbars (and menu). What you need to know is toolbar's ID. ID could be found in file vsshlids.h placed in your installed VSSDK inc folder. For output window toolbar this ID is IDM_VS_TOOL_OUTPUTWINDOW.
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?
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.
Where is the word-wrap icon to toggle back and forth in Visual Studio 2010? I want it in the toolbar or have a shortcut for it.
I see the option in the tools dialog box, but I switch back and forth constantly. I shouldn't have to dig through deep options to toggle this option on and off. Most editors have this option, but for some crazy reason, I can't find it in Visual Studio here...
Any help would be greatly appreciated. I can't find a solution online, and word wrap isn't even showing up in the program's help menu.
You can add the word wrap to any toolbar or menu via the Customize functionality in Visual Studio. You need to use the Edit > Toggle Word Wrap command. Here's how you can add it to a new toolbar.
Right-click the toolbar and click Customize in the menu.
In the Customize dialog click on the new button to create a new toolbar.
Give the toolbar a name and click OK.
Click on the Commands tab and click on the Toolbar radio button, then select the toolbar you just named.
Click on the Add Command button.
The Add Command dialog will appear and select the Edit selection in the Categories list box. Then select the Toggle Word Wrap command in the Commands List Box. Click OK to close the dialog.
In the default keyboard mapping scheme the Edit.ToggleWordWrap command has the shortcut Ctrl+E, Crtl+W predefined for the Text Editor.
The right-click context menus of the source editor, the project items and the solution item, is getting ridiculously long, and two of them even have scrolling now on my 1680x1050 screen.
Is there any way for me to hide items on these menus, even if I have to add an event to my Visual Studio macro-system and find and hide them manually?
Here's examples, many of these items I never use:
Edit1: The current answer + comments suggest I should use the Customize menu item in the toolbar context menus, go to the second tab, Commands, and use the Context Menus radio selection and find the relevant menus there.
Here are 3, which are suggested by comments:
As you can see, they're all empty.
Edit2: After clicking the "Reset All" button in that dialog, for the Solution and Project menus, I got items in the dialog, that I could edit, but the changes did not affect the actual context menu on either a project or the solution file. Also, after restarting Visual Studio, the dialog contents for those two were again empty.
In Visual Studio 2010 you can:
Goto Tools->Customize
Select the Commands tab
Select the Context menu radio button
Select the appropriate context menu from the dropdown list to the right, and delete away
I believe Visual Studio 2008 is similar.
You will need to choose the correct context menu in the Customise option.
Go to Tool > Customise,
Then choose the Context menu as you did in your Edit1 screenshots but choose "Editor Context Menus | Code Window" from the dropdown menu instead.
From there you should be able to delete whatever command you don't need from your context menu. Next, for the other commands that can't be found in Editor Context Menus | Code Window (mostly plug-ins or extensions related commands) you will have to go through other categories.
For example, I am using CodeMaid and when I right click a file in Solution Explorer the context menu below are shown
In order to remove the 'Cleanup Selected Code' command I will have to choose the Project and Solution Context Menus | Solution Folder dropdown option.
Added: Here is my sample reduced context menu (removed Copy, Cut, Paste, Outline Menu and Create Snippet...)
Hope this helps =)
Edit: In case you want to add back the commands you removed you can either add them back using New Command... or just press Reset All. Keep in mind the later will restore all the commands. Thus unless you are really having trouble finding the removed command use the first method.
I use 3 VS extensions and these 3 are responsible for polluting the context menu:
VSCommands
Power Commands
Power Toys
Using their own options dialogue, it's possible to subject showing those menus to pressing CTRL (in VS Commands) or completely disable them (the other 2 extensions)