[visual-studio] How can I make Visual Studio wrap lines at 80 characters?

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

This post is loosely related.

This question is related to visual-studio

The answer is


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.


Adds vertical column guides to the Visual Studio text editor. This version is for Visual Studio 2012, Visual Studio 2013 or Visual Studio 2015.

See the plugin.


You can also use

Ctrl+E, Ctrl+W

keyboard shortcut to toggle wrap lines on and off.


I don't think you can make VS wrap at 80 columns (I'd find that terribly annoying) but you can insert a visual guideline at 80 columns so you know when is a good time to insert a newline.

Details on inserting a guideline at 80 characters for 3 different versions of visual studio.


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.

If the problem is simply that you want to know when you pass 80 characters for a single line, which is a common coding guideline limit, you can use a different approach: Editor Guidelines. This will add vertical column guides behind your code.


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.


I don't think you can make VS wrap at 80 columns (I'd find that terribly annoying) but you can insert a visual guideline at 80 columns so you know when is a good time to insert a newline.

Details on inserting a guideline at 80 characters for 3 different versions of visual studio.


If the problem is simply that you want to know when you pass 80 characters for a single line, which is a common coding guideline limit, you can use a different approach: Editor Guidelines. This will add vertical column guides behind your code.


I don't think you can make VS wrap at 80 columns (I'd find that terribly annoying) but you can insert a visual guideline at 80 columns so you know when is a good time to insert a newline.

Details on inserting a guideline at 80 characters for 3 different versions of visual studio.


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.


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.

I stumbled upon this question when was actually searching for an answer to this one (how to add a visual line/guideline at char limit). So I would like to leave a ref to it here for anyone like myself.


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


I stumbled upon this question when was actually searching for an answer to this one (how to add a visual line/guideline at char limit). So I would like to leave a ref to it here for anyone like myself.


Adds vertical column guides to the Visual Studio text editor. This version is for Visual Studio 2012, Visual Studio 2013 or Visual Studio 2015.

See the plugin.


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.


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


You can also use

Ctrl+E, Ctrl+W

keyboard shortcut to toggle wrap lines on and off.