Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell VS Code format doc to wrap line after certain length? [duplicate]

In Visual Studio Code, when you press ALT SHIFT F to format HTML document, VS Code would wrap a line that is too long into multiple lines.

I think VS Code let the line grow too long before wrapping. Is there a setting in VS Code to tell it to wrap after certain line length?

This question is NOT a duplicate of the hard wrap question. This is about wrapping during format document process.

like image 863
Endy Tjahjono Avatar asked May 06 '18 10:05

Endy Tjahjono


1 Answers

Open user settings: File - Preferences - Settings

Then add/edit this item:

"html.format.wrapLineLength": 80

FYI the new settings are in effect after you save the changes.

like image 130
Endy Tjahjono Avatar answered Sep 19 '22 13:09

Endy Tjahjono