How to add a Word Wrap command to Visual Studio

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.

  1. Open the Tools menu and choose Customize.
  2. Go to the Commands tab.
  3. Select Context menu, then pick Editor Context Menus | Code Window from the dropdown.
  4. Click Add Command.
  5. Under Categories, choose Edit. Under Commands, choose Toggle Word Wrap, then click OK.
  6. Click Move Down until the command is at the end of the list.
  7. Click Modify Selection and tick Begin a Group to add a divider before the command.
  8. Click Close.

Now right-click anywhere in a code window, and Toggle Word Wrap is at the bottom of the menu.

Made using Obsidian and Hugo
Theme based on hugo-theme-stack by Jimmy Cai
Privacy policy ·  Cookie settings