Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode auto format without line wrap

Is there any extension or settings in VSCode where I can apply auto format but the line should not break to multi line.

Tried prettier but it breaks my conditions, statements or the function headers into multi lines.

enter image description here

like image 888
Anshad Vattapoyil Avatar asked Jun 10 '26 22:06

Anshad Vattapoyil


1 Answers

this is late but may be it helps someone else. All you have to do is go to

-> settings -> search "wrap"

-> Word Wrap -> mark this "off"

-> Word Wrap Column -> give this any number greater then 80(which is default)

-> Wrapping Intend -> Make this "none"

-> Debug > Console: Word Wrap -> Uncheck it

-> HTML > Format: Wrap Line Length -> Change it to "0"

-> Edit "Settings.json" file and add following at end:

"[markdown]": {
  
    "editor.wordWrap": "off",
    "editor.quickSuggestions": true
}, 

-> Restart VS Code and now line wrapping issue is fixed

like image 166
Minhaj Javed Avatar answered Jun 14 '26 08:06

Minhaj Javed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!