How can I make Visual Studio wrap lines at 80 char

2019-01-16 09:49发布

Is there any way to make Visual Studio word-wrap at 80 characters? I'm using VS2008.

This post is loosely related.

9条回答
甜甜的少女心
2楼-- · 2019-01-16 10:24

Unless someone can recommend a free tool to do this, you can achieve this with ReSharper:

ReSharper >> Options... >> Languages/C# >> Line Breaks and Wrapping

  • Check "Wrap long lines"
  • Set "Right Margin (columns)" to the required value (default is 120)

Hope that helps.

查看更多
对你真心纯属浪费
3楼-- · 2019-01-16 10:24

To do this with Visual Assist (another non-free tool):

VAssistX >> Visual Assist X Options >> Advanced >> Display

  • Check "Display indicator after column" and set the number field to 80.
查看更多
来,给爷笑一个
4楼-- · 2019-01-16 10:24

See also this answer in order to switch the mode conveniently.

Citation:

I use this feature often enough that I add a custom button to the command bar.

Click on the Add or Remove -> Customize
Click on the Commands tab
Select Edit|Advanced from the list
Find Toggle Word Wrap and drag it onto your bar

查看更多
登录 后发表回答