22

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!

Community
  • 1
  • 1
Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
  • I wonder whether this is a very recent change caused by a Windows Update as I don't remember noticing this margin yesterday. The "code assistance" light-bulb seems much more aggressive today (getting badly in the way). I cannot find an option to turn it off though. – Coder_Dan Oct 15 '15 at 09:14
  • Thanks @mbomb007 - Yeah, that link's already in my question. It doesn't solve anything for me because the rest of my team won't let me modify the project files to turn this off. Thanks for trying though, and thanks for your other comment. – Coder_Dan Nov 11 '15 at 09:10
  • See http://stackoverflow.com/questions/32614305/remove-extra-space-by-line-numbers-in-visual-studio-2015 – Sergey Vlasov Nov 16 '15 at 03:29
  • Thank you @SergeyVlasov. That does appear to be a similar question, asked in a different way. Sadly there is still no solution given, which perhaps indicates that there isn't one yet. As mentioned, the gap is much wider than it was in VS2013. – Coder_Dan Nov 16 '15 at 10:12
  • I had VS2015 installed and the margin looked the same as previous versions of VS. After I installed a new OS and reinstalled VS2015, the left margin is much bigger! – Qwertie Jul 29 '16 at 07:09

4 Answers4

12

I've created an extension for this, it hides both the outlining and suggestion margins.

Mussi
  • 382
  • 4
  • 4
1

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.

Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
  • The "light-bulb" feature shown in the left margin replaces the error tool-tip drop-down from previous versions of Visual Studio, which wasn't shown in the margins, but was rather shown to the bottom-right of an error when hovering over one, displaying as "Error Correction Options". I'm definitely not used to the light-bulb yet. – mbomb007 Nov 09 '15 at 19:55
1

Uncheck the following options:

Tools > Options > Text Editor > General Display

  • Selection margin
  • List item

Tools > Options > Text Editor > C# > Advanced > Inheritance Margin

  • Show inheritance margin

After unchecking these, there is still a margin for screwdriver (Quick Actions) icon. Currently, I don't have a solution for that.

KodFun
  • 323
  • 3
  • 8
0

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)

SergeyT
  • 800
  • 8
  • 15