Please can anyone tell me how I can get rid of the margin at the left edge of the editor in VS2015?
I don't mind the "indicator margin", but there is now a large space between that and the start of my code. In Tools-Options - Text-Editor - General - Display, I have the "Selection margin" turned off. Turning it on makes the gap even wider.
I believe that the additional margin is used by the new "code assistance" light-bulb, which I would gladly turn off, but I cannot find an option for it.
I have the Productivity Power Tools extension installed, but I don't think that this is responsible.
I have found that there is an answer here: How do you disable the light bulb in Visual Studio 2015? but this involved modifying project files, which will then impact the whole team, who don't want me to turn it off. It interested me to find out whether turning off all code analysis would fix the widened margin though, so I tried disabling all rules. Sadly this made no difference to the left-hand margin!
I've created an extension for this, it hides both the outlining and suggestion margins.
Concerning the light-bulb, it seems that there is currently no option to turn it off, but it is a requested feature: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/9139204-option-to-disable-quick-action-squiggles
Please add your votes to this one if you agree that it is important. Hopefully if Microsoft address this, then they might also address my issues with the left-margin.
Check the selection margin for an xml
file. The option works correctly for this file type.
An extra selection margin is added for cs
files by unknown reason. It looks like there is a bug in the IDE.
(tested on VS2017)
来源:https://stackoverflow.com/questions/33144047/reduce-left-margin-in-visual-studio-2015