Visual Studio can wrap long lines in the code editor, but the toggle is buried under Edit | Advanced, and its keyboard shortcut (Ctrl+E, W) is easy to forget.
Here is how to put it in the right-click menu of the code editor, so that it is always one click away.
- Open the Tools menu and choose Customize.
- Go to the Commands tab.
- Select Context menu, then pick Editor Context Menus | Code Window from the dropdown.
- Click Add Command.
- Under Categories, choose Edit. Under Commands, choose Toggle Word Wrap, then click OK.
- Click Move Down until the command is at the end of the list.
- Click Modify Selection and tick Begin a Group to add a divider before the command.
- Click Close.
Now right-click anywhere in a code window, and Toggle Word Wrap is at the bottom of the menu.
Comments are disabled until you accept functional cookies.