I’ve recently noticed that when typing out long lines of code, they split into multiple lines after this threshold and it bothers me. enter image description here
Not sure if it was a formatting extension that I put on here years ago, but I couldn’t seem to locate it in the settings.
2
Answers
This is a setting called rulers. Go into Settings and search "rulers". Then you will be able to edit the settings.json file. Under "editor.rulers" remove all values in the array so that it is empty. That should solve it.
The grey line isn’t what causes the wrapping. You can apply settings to have the grey line and not have wrapping. They grey line is displayed according to the
editor.ruler
setting.In general text editor terminology, this wrapping you are observing is called "soft wrapping" (when an editor wraps long lines in its rendering of the text, but doesn’t actually insert line-break characters, which is called "hard wrapping").
By default, soft-wrapping can be toggled by Alt+z (The command palette command is named
View: Toggle Word Wrap
).The default setting of soft wrapping for VS Code is configurable by the
editor.wordWrap
setting. It has several values it can take on:editor.wordWrapColumn
,editor.wordWrapColumn
The word wrap column is configurable by the
editor.wordWrapColumn
setting. See also theeditor.wrappingIndent
andwrappingStrategy
settings.