To enable word wrapping in Visual Studio Code, follow these steps:
- Open Visual Studio Code.
- Go to the View menu and select Command Palette (or press
Ctrl+Shift+P
on Windows/Linux or Cmd+Shift+P
on macOS).
- Type Preferences: Open Settings (UI) and hit Enter.
- In the search bar, type word wrap.
- Under Editor: Word Wrap, select the desired option:
- on: Wraps lines at the viewport width.
- bounded: Wraps lines at the editor width or a specific value.
- off: Disables word wrapping (default behavior).
Alternatively, you can directly modify your settings by adding this line to your settings.json
file:
"editor.wordWrap": "on"