How do I turn on text wrapping by default in VS Code
Visual Studio-CodeVscode SettingsVisual Studio-Code Problem Overview
Usually when I use VS Code, very first thing I do on new document is command: "Toggle Word Wrap" or Alt+Z. I tried looking into User Settings, but I didn't find any relevant entries. Is there some way to have text wrapping 'on' for every document by default?
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
The setting is now "editor.wordWrap": "on"
, which should be set to "on"
(the default value is "off"
).
Switching to "on"
activates word wrap on all documents in Visual Studio Code.
See the release notes about Word Wrap changes for more info.
Solution 2 - Visual Studio-Code
Version 1.32.3
If you don't want to edit any files you can just turn it on under user settings:
Code > Preferences > Settings > Text Editor
Type "wordwrap" in the search or scroll to bottom of the list just before the cursor section. You'll see it as "Word Wrap / Controls how lines should wrap."
Solution 3 - Visual Studio-Code
Have a look at the setting editor.wrappingColumn
(see the docs for more information)
Update 2017-04-06:
Recently the setting changed (see here) to editor.wordWrap
with several options:
> We therefore decided to deprecate editor.wrappingColumn
(with its -1,
> 0, >0 cases) in favor of editor.wordWrap
.
>
> Here are the new word wrap options:
>
> editor.wordWrap: "off"
- Lines will never wrap.
> editor.wordWrap: "on"
- Lines will wrap at viewport width.
> editor.wordWrap: "wordWrapColumn"
- Lines will wrap at the value of editor.wordWrapColumn
.
> editor.wordWrap: "bounded"
- Lines will wrap at the minimum of viewport width and the value of editor.wordWrapColumn
.
Solution 4 - Visual Studio-Code
In 2020, here are simple steps to do it.
- Click on 'File' on the top menu.
- Click on 'Preferences' --> 'Settings'.
- Scroll a little bit until you find 'Editor: Word Wrap'.
- Click on the dropdown menu and choose 'on'.
- Done. Settings will be saved by default.
Hope this helps.
Solution 5 - Visual Studio-Code
So easy. This solution worked for me.
Click on 'File' on the top menu. Click on 'Preferences' --> 'Settings'. Search Word Wrap in the search box then you will see Editor: Word Wrap. Click on the dropdown menu and choose 'on'. It will definitely work. Thank You.
Solution 6 - Visual Studio-Code
Firstly go to the setting-> the search on search box word wrap-> then on the word wrap option.
Solution 7 - Visual Studio-Code
Solution 8 - Visual Studio-Code
- Press ctrl + , from the keyboard.
This will take you to the settings tab.
- Type word wrap in the search tab.
- Click on Editor: Word Wrap drop down.
- Select on.
You are done. See the image and follow the red boxes.