Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to hide outline margin in Visual Studio 2012?

Tags:

In Visual Studio 2012 it's a lot of margins to the left of source code text: Indicator Margin, Selection Margin and Outline Margin. As an old programmer i prefer an uncluttered text, so i want all 3 margins to be hidden from me. In Text editor settings i can hide indicator and selection margins, but i didn't found how to hide an outline margins. Outline graphics (all this "+" things and ines) can be easily hidden from "edit" menu, but margins itself remains. Is it possible to hide it or such feature is not implemented? In previous versions of Visual Studio it auto-hides if "selection margin" was disabled, but now it seems that it don't hide at all :(.

enter image description here

Update

A little clarification why I need it. As correctly mentioned in comments, it's very unusual to have preferences for text formatting and appearance. I agree with that. Unfortunately, in my personal case, I work with text like 10 hours per day for dozens of years and my brain is kind of trained to calculate indentation from text editor left edge. And every time I work in Visual Studio my "wrong indentation" instinct is often triggered by this empty space :). Of course i can re-train myself, but since ALL editors except Visual Studio displays text close to left edge, I will try to configure Visual Studio first.

like image 456
grigoryvp Avatar asked Dec 12 '13 10:12

grigoryvp


People also ask

How do I enable outlining in Visual Studio?

Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining. Show activity on this post. Show activity on this post. For VS2008, it's under Tools – Options – Text Editor – C/C++ - Formatting - Enter outlining mode when files open.


1 Answers

Turn off the Indicator margin with Tools + Options, Text Editor, General, untick "Indicator margin"

Turn off the Selection margin with Tools + Options, Text Editor, General, untick "Selection margin"

Turn off the Outline bar with Edit + Outlining, Stop Outlining. That is however liable to come back when you open a new file. You can make it consistent for the C# IDE with Tools + Options, Text Editor, C#, Advanced, untick "Enter outlining mode when files open". If you want to do this for other kinds of files as well then you need to write an add-in that listens for the DocumentEventsClass.DocumentOpened event.

like image 175
Hans Passant Avatar answered Oct 29 '22 08:10

Hans Passant