Skip to main content

How to Enable Word Wrap in VS Code

· One min read
Jagdish Kumawat
Founder @ Dewiride

Word wrap is a handy feature in Visual Studio Code that automatically moves long lines of code or text onto the next line, making your files easier to read and edit—especially on smaller screens.

Enable Word Wrap via Menu

  1. Open your file in VS Code.
  2. Go to the top menu and select View > Word Wrap.
    • Alternatively, use the command palette (Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux), then type and select Toggle Word Wrap.

Enable Word Wrap via Settings

  1. Open Settings (Cmd+, on Mac or Ctrl+, on Windows/Linux).

Go to Settings

  1. Search for word wrap.
  2. Set Editor: Word Wrap to on.

Set Word Wrap

Keyboard Shortcut

  • Press Option+Z (Mac) or Alt+Z (Windows/Linux) to quickly toggle word wrap on or off in the current editor.

Make Word Wrap Default

To always enable word wrap for all files:

  1. Open Settings (JSON view).
  2. Add the following line:
"editor.wordWrap": "on"

Now you can enjoy better readability and a cleaner editing experience in VS Code!