Turn Off or On Outlining


Keyboard:  CTRL + M, CTRL + P (stop outlining)
Menu:  Edit -> Outlining -> Stop Outlining; Edit -> Outlining -> Start Automatic Outlining
Command:  Edit.StopOutlining; Edit.OutliningStartAutomaticOutlining
Versions:  2008,2010
Published:  3/19/2010
Code:  vstipEdit0033

 

If you don't like the Outlining feature in Visual Studio:

image

 

You can turn it off one of two ways:

  1. Hit CTRL + M, CTRL + P on your keyboard
  2. Go to Edit -> Outlining -> Stop Outlining on your Menu Bar

 

To turn it back on, go to Edit -> Outlining -> Start Automatic Outlining on your Menu Bar.  Ironically, there is no keyboard shortcut for turning Outlining back on.

Comments (9)

Cancel reply

  1. Apart from the missing shortcut to start outlining, I find it a bit odd that the menu command for stopping is "Stop Outlining", while the start command is called "Start *Automatic* Outlining".

  2. TobyLiu says:

    when I use CTRL+M+P, it is toggle out first time, but after that I can not toggle out any more till I reopen the file.

  3. Rich says:

    I have outlining turned-on but nothing appears, I have to force is by manually selecting a block then choosing collapse block from the menu then the plus symbol appears.

    Is it broken!?

  4. zainnab says:

    @Rich

    In VS2010 It can be a little wierd sometimes.  Try turning it off, then closing the file, then open it again, and finally turn it on.  If that doesn't work there may be another issue with your outlining.

    If you are in VS2008 then go to Tools – Options – Text Editor – General, and make sure Selection Margin is checked.  If this is turned off the left-margin that indicates a code block is gone but outlining still works.  

  5. Valdyr says:

    I'm using VS2008, and every time I collapse a block, after a few seconds it opens and there are no more minus signs at the begining of an block.. it's a little frustrating, especially when I have to scroll up a large block of code… does anyone know why this happens? (Thanks)

  6. sbro@hotmail.com says:

    "Right click the master page and select Open With > Then select Master Page Editor with Encoding > Select Auto Detect for the option. It may take a second or two but the outlining should appear." This tip from a colleague at PointBridge: blogs.pointbridge.com/…/Schwenker_Andrew

  7. Ed says:

    I had trouble with outlining in 2010. For some files it just wouldn't work. I found that by first  edit->outlining->stop outlining then close the file and reopening it enabling outlining mode to work again. Flakey!

  8. pcunite says:

    For VS2013 and VS2015 you can add this command (along with format) by editing your CurrentSettings.vssettings file and adding this to the UserCustomizations section.

    <UserCustomizations>

    <add Cmd="{D309F791-903F-11D0-9EFC-00A0C911004F}:00000503" CmdPri="05008001" Group="{D309F791-903F-11D0-9EFC-00A0C911004F}:00000171" GroupPri="01000000" Menu="{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001"/>

    <add Cmd="{5EFC7975-14BC-11CF-9B2B-00AA00573819}:0000032a" CmdPri="00800001" Group="{D309F791-903F-11D0-9EFC-00A0C911004F}:00000173" GroupPri="05000000" Menu="{D309F791-903F-11D0-9EFC-00A0C911004F}:00000001"/>

    <add Cmd="{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:0000008f" CmdPri="01504001" Group="{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553" GroupPri="01030000" Menu="{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e"/>

    <add Cmd="{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000083" CmdPri="01508001" Group="{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:00000553" GroupPri="01030000" Menu="{9ADF33D0-8AAD-11D0-B606-00A0C922E851}:0000000e"/>

    </UserCustomizations>

  9. Warren Diprose says:

    (I'm using Visual Studio 2015)

    Go to Tools > Options > Environment > Keyboard

    Either type 'Edit.StartAutomaticOutlining' into the 'Show commands containing:' textbox or scroll down list to find 'Edit.StartAutomaticOutlining'.

    Type your own shortcut key strokes into the 'Press shortcut keys:' textbox.

    Click 'OK'

    Since the preset key strokes to turn outlining off is CTRL+M,CTRL+P I chose CTRL+SHIFT+M, CTRL+SHIFT+P as my shortcut to turn it on.

    I also chose to apply these settings to 'Global' so they work in all my C# code behind, js, etc. as well.

Skip to main content