Reduce left-margin in Visual Studio 2015

元气小坏坏 提交于 2019-12-21 07:01:01

问题


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!


回答1:


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




回答2:


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.




回答3:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!