How can I wrap text/comments in Visual Studio Code?
File > Preferences > Settings
New Setting UI (Searchable )
Just Search Wrap / Word Wrap
- editor.wordWrap: "off" - Lines will never wrap. editor.wordWrap: "on" - Lines will wrap at viewport width
- 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.
References: https://code.visualstudio.com/updates/v1_10#_word-wrap-settings-redesign and info from @jermila-dhas
Deprecated (For History Purpose/How JSON setting should look like)
For Beginner
Paste the following in settings.json
// Place your settings in this file to overwrite the default settings
{ "editor.wrappingColumn": 0 }
That it, it is that simpler, but probably we will having someone open source user interface for json settings.
For Intermediate User
If you already have settings.json
, just add
"editor.wrappingColumn": 0
As the settings is in JSON, last settings are without the comma ,
and setting is ending with }
as you see in Default settings and the settings.json
overide all the Default settings
If you are using visual studio code v1.10, the setting "editor.wrappingCloumn"
has been deprecated.
Use "editor.wordWrap": "on"
instead.
More information can be found here
(Hoping this might help somebody)
you can do it by this shortcut : alt + Z