Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in Visual Studio code, how to extend the maximum line width

No matter what I did, I can't set the line to be bigger than 80 characters. I went in settings and set all to 160, but to no avail. I have prettier, but I don't know how to see its config file. Do you know how to enlarge the maximum line length? I am developing typescript (angular to be precise).

like image 893
Vladimir Despotovic Avatar asked Feb 04 '20 15:02

Vladimir Despotovic


People also ask

How do you increase line spacing in VS Code?

For VS 2022 There's a built-in setting for that, just open the Tools menu > Options > Text Editor > General and look for a setting called Line Spacing, change its value to one of your liking.

How do you extend VS Code?

You can browse and install extensions from within VS Code. Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.

How do you show full long line in Visual Studio code word wrap off?

10.8 and Alt + Z is the keyboard shortcut for turning word wrap on and off. This satisfies the requirement of "able to turn it on and off quickly". The setting does not persist after closing Visual Studio Code.


2 Answers

To completely disable the wrapping:

Settings > Editor: Word Wrap > Off

To set the wrapping to the 160th column:

Settings > Editor: Word Wrap > wordWrapColumn

Settings > Editor: Word Wrap Column > 160

Or add the following to your settings.json:

"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 160

You can open the settings file by pressing F1 and typing settings.json.

like image 160
AlexG Avatar answered Sep 21 '22 10:09

AlexG


latest version of visual studio code (or codium) seems to handle multiple wrap lines.

in settings.json for example: "editor.rulers": [100, 120, 140]

like image 23
Laurent Pinson Avatar answered Sep 18 '22 10:09

Laurent Pinson