![]() Menu: Tools->Customize Command: Tools.Customize Versions: 2010 Published: 7/29/2010 Code: vstipEnv0031 You can customize any toolbar in Visual Studio 2010. Just click on the drop-down to the right of any toolbar then click on 'Add or Remove Buttons': Then click on 'Customize': Alternatively, you can go to Tools -> Customize on the Menu Bar: Whichever option you choose, you will get the Customize Dialog: We've already explored the Toolbars Tab in vstipEnv0030 so click on the Commands Tab: As you can see this is a fairly complex beast so let's break it down into its parts as we do an example. First is the choice of menu or toolbar to modify. In this case I will choose the Editor Context Menu you see when you RIGHT CLICK while writing code: Next, is the Controls area that shows the items on the menu or toolbar you have chosen to modify. For our example, it shows the items available when we RIGHT CLICK in a code window: Remember that not all the items you see are available all the time as these items only show up in the proper context. So while there are a billion buttons currently available, when I RIGHT CLICK in my code window this is all I currently see: Finally, there is the workhorse area of the dialog that has all the buttons that actually DO stuff: Add Command-let's you add a new item to the existing menu or toolbar. Add New Menu-creates a new menu in the existing menu or toolbar. Command Palette. Ctrl+P will let you navigate to any file or symbol by typing its name. Ctrl+Shift+Tab will cycle you through the last set of files opened. Ctrl+Shift+P will bring you directly to the editor commands. Best dvd burner for a mac ratings. Ctrl+Shift+O will let you navigate to a specific symbol in a file. Ctrl+G will let you navigate to a. Delete-removes the current item from the Controls area. Move [Up or Down]-changes the location of the item in the Controls area. Modify Selection-allows you to make changes to the existing item in the Controls Area such as resetting it back to default settings, changing the name, and text visibility. Additionally, it has the ability to make a new group on the menu or toolbar. Reset All-will reset every item in the Controls area to its default settings. Particularly useful if you have made a lot of changes. Okay, so getting back to our example. We want to add the comment and uncomment buttons to the context menu so I can use them when I select some code and RIGHT CLICK. First I click on the Add Command button which brings up the Add Command dialog: Now I need to locate where the comment and uncomment items are located. How would I do this? Well the best path is usually to see if the item can be found on a menu somewhere and use that as a clue: Since I see that the items I want are off the Edit Menu then I can search there first. Unfortunately, the items we want are now called 'Selection Comment' and 'Selection Uncomment': Find each one of these items and click OK to add them to the Controls list: I think it would be cool to have these buttons in their own group so I will select the item ABOVE which I would like the group line to be ('Marker Commands' in this case) then click on Modify Selection and choose 'Begin a Group': This creates a new group line and now my commands are in their own group: That's it! Just I just click on the Close button and go to any code area. Select some code and RIGHT CLICK and select Comment Selection: It works like a charm and you are all set to begin making your own modifications as you want to your environment. The Add Command dialog desperately needs a way to search or filter the commands. ![]() Can mac use ntfs. (At least VS2010 has made it resizable, by the look of it the screenshots.) (A couple of days ago I spent ages looking for a command that was in VS2005 but seems to have been removed in VS2008. Gave up looking after several minutes searching different categories and the long lists within them. If I could have just typed 'Word' (to find the toggle for Find Full Words, if it still exists) it would've taken seconds to find the item or realise it was gone.).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |