13 August 2013

Fixing Visual Studio 2012 defaults

One of the biggest pet peeves I experienced when switching to Visual Studio 2012 was the fact that the default command buttons were changed.  In going for a cleaner look, many of the main command buttons most developers use most frequently, was removed from the toolbar interface and buried in the menu structure instead.
Personally, the buttons I find myself using most frequently are the Navigate Backwards and Navigate Forwards (image ), Comment Selected Lines and Uncomment Selected Lines (image ) and lastly Increase Line Indent and Decrease Line Indent (image ).
The Navigate functions are still there, but the Comment and Indent functions are buried deep within the Edit/Advanced menu.  While it’s true that the Comment functions do have hot keys attached to them, I hardly consider Ctrl+K,Ctrl+C for a single click to be useful to most developers save the few that know the hotkeys by heart.
As for the Indent commands, they don’t have any hotkeys and you’d have to click through Edit/Advanced/Indent to get the action.  Though small annoyances, these can be addressed by simply adding the commands back to the command bar.  Here’s how to do just that:
  1. Click Tools on the menu bar.
  2. image
  3. On the popup menu, click "Customize".
  4. After the Customize dialog window opens, click over to the "Commands" tab.
  5. Select the "Toolbar" radio button.
  6. In the dropdown to the right of the Toolbar radio button, select the "Standard" toolbar to work with.
  7. The toolbar's controls will be previewed in the bottom left of the dialog window.
  8. To the right of the preview, click the "Add Command" button.
  9. image
  10. In the Add Command dialog window that opens up, select the "Edit" category to the left.
  11. On the right, scroll down through the commands and locate the "Line Indent" command.
  12. Select the command and click the "OK" button.
  13. image
  14. The command will be added to the top of the Controls preview.
  15. image
  16. Repeat steps 8 through 12 for the "Line Unindent", "Selection Comment" and "Selection Uncomment" commands as well.  The interface doesn't allow multi-select, though that would be nice touch in a future update.
  17. Once you have all the commands, use the "Move Up" and "Move Down" buttons to the right to arrange the commands in the order you wish them to appear on the toolbar.
  18. image
  19. When you're happy with the arrangement, click the "Close" button.  Your new toolbar should now reflect your favorite buttons again. :-)
  20. image

Happy coding!
C
image

No comments:

Post a Comment

Comments are moderated only for the purpose of keeping pesky spammers at bay.

Microsoft Authentication Library (MSAL) Overview

The Microsoft Authentication Library (MSAL) is a powerful library designed to simplify the authentication process for applications that conn...