Programming‎ > ‎

VS 2008 Usability Fix


Across the years Visual Studio has evolved and some of the standard settings have evolved with it. Some for better, some for the worse.
The following are some fixes that I apply to my installations of Visual Studio to render it more productive for my needs.
Some of the shortcuts are related to Visual Assist X, a plug-in that greatly enhances code navigation and simplifies refactoring of C++ code.

On first run

  • Choose: C++ Development

Menu -> Tools -> Options ->

-> Environment -> Keyboard

  • Apply the following additional keyboard mapping scheme: -> Visual C++ 6

This should be already set to Visual C++ 6 if one picked C++ Development on first run.
Use Ctrl+Tab to quickly flip document windows
  • Show commands containing: -> "nextdo"
  • Select Window.NextDocumentWindow
  • Press shortcut keys: -> Ctrl+Tab (Overrides "Window.NextDocumentWindowNav")

The new "Window.NextDocumentWindowNav" is lame and slows you down. Reverting to the old Ctrl+Tab behavior allows to flip through all open documents quickly, by glancing at the content, rather than the file name.
Hold down Ctrl and press Tab to advance to documents sequentially. After Ctrl is released, next time Ctrl+Tab is presed again, it will show next what was the visible document when Ctrl+Tab was previously used.
This allows to cycle quickly between a small subset of the opened documents (becomes a natural way to browse code, assuming that one has code properly split into many files ;)

Close document windows with Ctrl+W
  • Show commands containing: -> "closedocu"
  • Select: Window.CloseDocumentWindow
  • Press shortcut keys: -> Ctrl+W (Overrides "Edit.SelectCurrentWord")
  • Use new shortcut in: -> Text Editor
  • Press shortcut keys: -> Ctrl+W (Overrides "Edit.SelectCurrentWord")

Makes it quick to close a document with the left hand alone (no need to reach for F4 with the right hand).

Go to next bookmark with F2
  • Show commands containing: -> "nextbook"
  • Select Edit.NextBookmarkInDocument 
  • Use new shortcut in: -> Text Editor
  • Press shortcut keys: -> F2 (Overrides "Edit.SelectCurrentWord")

Quickly find all references to a symbol (requires VAssistX)
  • Show commands containing: -> "vassistx.find"
  • Select VAssistX.FindReferences
  • Press shortcut keys: -> Alt+R (Overrides "Image.RectangleTool")

This is one of the most important features of Visual Assist X. It allows to find all references of a certain symbol. I use it constantly, so a dedicated shortcut is a must 8)

Focus on window with found references to a symbol (requires VAssistX)
    • Show commands containing: -> "vassistx.find"
    • Select VAssistX.FindReferencesResuls
    • Press shortcut keys: -> Alt+F

    Allows to go back to the "found references" window without having to use the mouse. Then one can use the cursor keys and Enter to jump to another reference.

    Search for a filename (requires VAssistX)
      • Show commands containing: -> ""
      • Select VAssistX.VAViewFIS
      • Press shortcut keys: -> Ctrl+\ (Overrides "View.CodeDefinitionWindow")

      On some VS installations the standard Shift+Alt+O is overwritten by some Web site selection stuff (useless to C++ programmers).
      While the standard Shift+Alt+S to find symbols works fine, I settled for the custom Ctrl+\ to find files.

      -> Projects and Solutions -> General

      • Track Active Item in Solution Explorer: -> ON

      See in real-time the "nearby" files to the one that is being edited. Especially useful if CPP and H files are kept in the same virtual folder in the project.
      I usually have physical folders for src and include, but both headers and source files are put in the same virtual project folder.

      -> Text Editor

      • Enter outlining mode when files open: -> OFF 

      If you need outlining, then maybe your file/function is too long...

      • C/C++ -> Display -> Line numbers: -> ON

      To get a sense of where you are 8)

      Importing the whole thing

      Personally I keep a ".vssettings" file around so that I can simply import all of the above settings and more, it into new installations of VS.
      A copy of my  recently exported ".vssettings"  file can be found over at The Filez page.

      To import the settings, choose Import and Export Settings... from the Tools menu.

      • I suggest following VS' suggestion to export your current settings first (it's a default step that takes virtually no time)
      • When importing, select only the subsections that you want (e.g. do not import the color scheme if you don't want that).
      • Apparently, the color scheme data does not include Visual Assist X additional syntax coloring settings.. so, those need to be changed manually afterwards.