开发者

Visual Studio - C# Auto Format - Wrapping to 100 columns

开发者 https://www.devze.com 2022-12-31 02:48 出处:网络
I can\'t for the life of me find o开发者_Python百科ut how to get visual studio to keep my source to 100 columns width as part of auto-format.

I can't for the life of me find o开发者_Python百科ut how to get visual studio to keep my source to 100 columns width as part of auto-format.

Ctrl+K+D

Surely this doesn't require an extension? What's the simplest way to set it up?


I don't think this is possible as part of auto-format. If you use a tool like Resharper, it does have this option, but I don't think it works in all scenarios such as wrapping strings, for example (i.e. string x = "<over 100 characters here>" is not going to be corrected).

I think the best thing to do is to use a guideline in the editor. Then, as you write your code you can just make sure you don't go past the guideline. Not the ideal solution, but it works pretty well.

0

精彩评论

暂无评论...
验证码 换一张
取 消