How can I toggle word wrap in Visual Studio?
Following https://docs.microsoft.com/en-gb/visualstudio/ide/reference/how-to-manage-word-wrap-in-the-editor
When viewing a document: Edit / Advanced / Word Wrap (Ctrl+E, Ctrl+W)
General settings: Tools / Options / Text Editor / All Languages / Word wrap
Or search for 'word wrap' in the Quick Launch box.
Known issues:
If you're familiar with word wrap in Notepad++, Sublime Text, or Visual Studio Code, be aware of the following issues where Visual Studio behaves differently to other editors:
- Triple click doesn't select whole line
- Cut command doesn't delete whole line
- Pressing End key twice does not move cursor to end of line
Unfortunately these bugs have been closed "lower priority". If you'd like these bugs fixed, please vote for the feature request Fix known issues with word wrap.
I use this feature often enough that I add a custom button to the command bar.
- Click on the Add or Remove Buttons -> Customize
- Click on the Commands tab
- Click Add Command...
- Select Edit (or Edit|Advanced for newer VS versions) from the list
- Find Toggle Word Wrap and drag it onto your bar
As of Visual Studio 2013, the word wrap feature is finally usable—it respects indentation. There's still a couple of issues (line highlighting, selection), but it's worth using. Here's how