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.
Related
How can I show these buttons please? They are usually there in C# but not in R. I can use of course CTRL+E, U and CTRL+E, C. Thanks!
They are in the Text Editor toolbar.
View --> Toolbars --> Text Editor
Open Tools menu, select Customize. In the dialog that opens, select the Commands tab. Select Toolbar radio button and in the dropdown next to it select the toolbar you wish to add the buttons to. Or go to the Toolbars tab and create a new one, select it, then back to Commands tab and select the new toolbar.
Click on Add Command..., select the Edit category and then scroll through the long list of commands until you find "Selection Comment" and Selection Uncomment" and add them to your toolbar.
My new installs or updated versions of VS sometimes seems to not remember my personal preferences, so I've had this same question, as well. The default key commands work, but sometimes the new VS does not show the toolbars that include the comment/uncomment buttons for all the file types in which I want them to show.
To add the buttons, open a file you are not seeing the tabs for, click View => Toolbars, and make sure Text Editor is selected.
Or, right-click on some open tab space at the top of your VS screen, and click "Customize". The resulting window should show plenty of Toolbars in the Toolbars tab. Make sure the "Text Editor" is selected - that's where the comment/uncomment buttons reside.
This should be the case for Visual Studio 2015-2017
For those who are looking for comment and uncomment buttons in visual studio 2019, I am posting here...
You can do it in two ways
Right click on any free space in the Visual Studio toolbar, then select “Text Editor”. comment and uncomment buttons will appear.
Go to view -> toolsbar -> texteditor then you can see comment and uncomment buttons.
I'm using Visual Studio 2017, and I really need a menu with useful buttons in the toolbar, now when I got into the customization menu TOOLS -> Customize -> Commands.
I made a custom menu "MY_MENU" and menu item "Close Project", but for some reason I just can't move the menu item into the menu (see picture). How do I do this?
I believe I had the same problem as the questioner, and managed to solve it, details below.
Note: I use Visual Studio 2015 Professional, but this should apply to later versions as well.
Scenario
I created a new Toolbar FooToolBar, and placed to the toolbars like this:
Goal
To place the "Solution explorer" icon inside the menu.
Problem
Inside the Customize window you can't just drag&drop the item to the menu:
Solution
Inside the Toolbar combobox, a new item appeared, select that:
After this, you will see a new area where you should place the icon you wanted to.
Also, remove the previous icon from the previous, FooToolBar toolbar item.
After doing this, press OK and it will work.
Result
I hope I helped someone. :-)
Warning: After you customize a toolbar or menu, make sure that its check box remains selected in the Customize dialog box. Otherwise, your changes won't persist after you close and reopen Visual Studio.
Adding, removing, or moving a menu on the menu bar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Commands tab, leave the Menu bar option button selected, leave Menu Bar selected in the list next to that option, and then perform one of the following sets of steps:
Adding, removing, or moving a toolbar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Toolbar tab, perform one of the following sets of steps:
To add a toolbar, choose the New button, specify a name for the toolbar that you want to add, and then choose the OK button.
Customizing a menu or a toolbar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Commands tab, choose the option button for the type of element that you want to customize.
In the list for that type of element, choose the menu or toolbar that you want to customize, and then perform one of the following sets of steps:
To add a command, choose the Add Command button.
In the Add Command dialog box, choose an item in the Categories list, choose an item in the Commands list, and then choose the OK button.
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.
When I press ctrl+R, ctr+R, a dialog comes up
Lets assume that I want to map the shortcut to "Refactor.Rename".
When I clicked OK here, the action was not mapped to the shortcut.
Instead the shortcut became disabled as in not being "available".
Resetting all shortcuts to visual studio defaults and doing this again actually gave me the resharper action upon pressing Ctrl+R, Ctrl+R.
Does it matter when I select in this list before I press OK?
If I select something in the list and also make a radio button selection, what will be the result?
Is there any way for me to use this dialog to select an action without resetting all shortcuts to either visual studio defaults or resharper defaults?
List selection doesn't matter and only radio button selection makes sence. There is no reference to list selection in documentation.
The "shortcut became disabled as in not being "available"" message is displayed even if your code window lost its focus. Are you sure the shortcut really was broken?
I have a small application which contains a form with a menu along the top. I wish to make changes to the menu, but can't seem to do so from within the VB IDE. Every time I click on it to select it, the code for the item clicked is displayed.
Does anyone know how to edit the menu bar from within the IDE?
(I could edit the .frm file to make the necessary changes but I am reluctant to do this if a "proper" way exists.)
You can edit a VB6 menu in the IDE by bringing up the Menu Editor by selecting Tools > Menu Editor or by pressing Ctrl+E.
You can find fairly complete instructions here and here.
Right click the form and select the Menu Editor option.
Tools -> Menu Editor from the IDE menu bar.
The option should also be available on the Standard toolbar and the form context menu.
This modal dialog is only available when the form designer has focus.