我可以停止Visual Studio 2015将编译器指令放在左边缘吗? [英] Can i stop visual studio 2015 putting compiler directives against left margin?

查看:88
本文介绍了我可以停止Visual Studio 2015将编译器指令放在左边缘吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我几乎可以听到来自这里的批评声,但我一个人工作,我总是发现编译器指令更容易阅读它们与它们正在影响的代码放在相同的缩进级别。在旧版本的Visual Studio中,它将它们留在我放置它们的位置,但2015年坚持在文件格式化时移动它们。



有没有人知道插件或设置会让我把它们放在我喜欢的地方吗?



亲切的祝福~Patrick



PS - 请注意,如果我在团队中工作,我当然会遵循团队决定的任何惯例。



我尝试了什么:



我关掉了选项| C#|格式化|一般|自动格式化语句;并且粘贴

Hi,

I can almost hear the clamour of criticism from here, but I'm working alone and I have always found compiler directives much easier to read when they are placed at the same indent level as the code they are affecting. In older versions of Visual Studio, it left them where I put them, but 2015 insists on moving them whenever the file is formatted.

Does anyone know of a plugin or setting that will let me keep them where I like them?

Kind wishes ~ Patrick

PS - Please note, if I were working in a team, I would of course follow whatever convention the team had decided upon.

What I have tried:

I've turned off Options | C# | Formatting | General | Automatically format statement on ; } and paste

推荐答案

Visual Studio中没有内置任何内容可以关闭它,编辑文档格式化程序不会对指令应用缩进。我不知道插入或缩进的插件。
There is nothing built into Visual Studio that will turn that off and the edit document formatter does not apply indenting to directives. I don't know of a plugin that puts the indenting in or maintains it.


这篇关于我可以停止Visual Studio 2015将编译器指令放在左边缘吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆