I've created a MACRO in visual studio 2010 that builds my project and attaches it to several processes. Unfortunately, unlike in vs2008, I can't add it to a toolbar so I can run it with a press of a button; after looking it up I found out the guys at Microsoft left the option of adding a macro button out of vs2010:
http://social.msdn.microsoft.com/Forums/en-CA/vsx/thread/87455de6-2a7d-42dd-b51f-ddd442c3e3fd
Am I wrong and there is a way/workaround that can solve this?
It's possible. Tools + Customize, Commands tab, Toolbar radio button. Use the combo to select the toolbar you want to change. Add Command button, Categories = Macros, select the macro in the Command list. Modify Selection to alter the button properties.
What you can't do is select an image for the new button. That's indeed stunningly lame, looks like they just didn't have time to get it done. You can add your vote to this feedback article. But surely on the todo list for the next version already.
Related
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.
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.
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)
The paid version of CodeRush has a feature where you can "drop a marker" in the code and later go back to them. They work like a stack, so you can drop markers (across multiple files) and go back to them in the reverse order that you dropped them.
Is there a dev studio extension that does anything similar?
If you want, you can work around this limitation (No "Drop Marker" feature in CodeRush XPress). Here's how you can do it:
Create a new DXCore plug-in via the File -> New -> Project... -> Visual C# -> DXCore -> Standard Plug-in item. Enter name if necessary and click OK.
On the next "DXCore Project Settings" accept the defaults (click OK).
Drop an Action component (DXCore section) from the Toolbox on the PlugIn1 design surface.
Select the Action component and fill the "ActionName" property, e.g. "MyDropMarker".
Create an event handler for the "Execute" event of this Action component.
Inside this handler type this code line: "CodeRush.Markers.DropSelection();" (no quotes)
Build the plug-in project.
You're almost done...
Start a new instance of Visual Studio IDE.
Press the CTRL+ALT+SHIFT+O to open the Options Dialog.
In the tree view on the left, navigate to this folder: "IDE"
Select the "Shortcuts" options page.
Click on the "New Keyboard Shortcut" button.
Press the key you would like to bind to the MyDropMarker action, e.g. ALT+Home
Select the "MyDropMarker" action in the Command combo box.
Modify the context of the shortcut if necessary (e.g. Focus\Documents\Code Editor (so it has a green tick))
Save the options - click OK.
Now you have your own feature similar to the CodeRush's "Drop Marker" feature.
There's a completely free version of CodeRush called "CodeRush Xpress" - it also has markers support.