141

When I have long text line I would like to show it next line. enter image description here

What is the property name in VS Code?

Fabian Lauer
  • 8,891
  • 4
  • 26
  • 35
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
  • More info here https://stackoverflow.com/questions/43122175/automatically-hard-wrap-lines-at-column-in-vscode/45883430 – frederj Nov 26 '19 at 16:17
  • 4
    Alt + z worked great. Wanted to see commit details of a line, but VS Code cuts it with "...". With Alt+z it provides multiple lines and I could see the line's commit details. – Manohar Reddy Poreddy Mar 22 '21 at 09:09

7 Answers7

211

The menu under File > Preferences or press Ctrl+, (on Mac Code > Preferences > Settings or press Command (or Cmd) ⌘+,) provides entries to configure user and workspace settings. You are provided with a list of default Settings.

Set editor.wordWrap: on in your User Settings or Workspace Settings under preference.

Select the below options to change to the desired settings.

  • Off - Lines will never wrap.
  • on - Lines will wrap at the viewport width.
  • wordWrapColumn - Lines will wrap at "Editor: Word Wrap Column".
  • bounded - Lines will wrap at the minimum of viewport and "Editor: Word Wrap Column".

You can toggle word wrap for the VS Code session with Alt+Z (macOS: Option (or Alt) ⌥+Z) or select View > Word Wrap from Menu.

For more about User and Workspace Settings or Key Bindings for Visual Studio Code

Mable John
  • 4,518
  • 3
  • 22
  • 35
89

On Windows, press Alt + Z (macOS: Option ⌥ + Z) to toggle word wrapping, or, select View > Toggle Word Wrap from VSCode Menu.

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Jonathan Ramos
  • 1,921
  • 18
  • 21
29

For Windows, Pressing Alt+Z will break the line.

JustAnotherGirl
  • 311
  • 3
  • 5
4

For Windows users do the following in -->

  1. Open VScode
  2. Go to Settings(Gear icon on the bottom-left side)
  3. Click Settings in the menu
  4. In the searching bar search for "word wrap"
  5. Click the drop-down menu and change it to "on"

This setting will wrap your words according to your editor: viewport.

In case this auto wrapping isn't working you can press --> Alt + z to wrap content

iam_anirban
  • 91
  • 1
  • 9
3

In VS Code:

  1. Install Beautify plugin. (or any Formatter)
  2. Go to the file & select the desired part.
  3. Right-Click on it & select Format Selection Or press Ctrl + k Ctrl + F.

Hope this helps.

1

HTML > Format: Wrap Line Length set the maximum number of characters (for example - 1000)

Serg Bakay
  • 87
  • 4
-1

You can press Ctrl + W / Ctrl + L to toggle word wrapping or select Main menu "Edit>Advanced>Word Wrap" .

Machavity
  • 30,841
  • 27
  • 92
  • 100