Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wrap multi-line comments in vs code

VS Code seems to understand what it means to wrap multi-line comments differently from what other IDEs understand. For instance if I set Intellij to wrap multi-line comments at column 100, it breaks the line for me. But if I ask VS Code to do the same, it visually wraps the line but if I later open the same file in a simple text editor, I get one long line.

How do I get VS Code to auto break long comment lines?

Intellij:

/**
* Intellij will break this line
* at the correct location 
* because I asked it to break 
*/

VS Code

/**
* VS Code will wrap this line
 at the correct location 
 but it's really one very 
 long line. 
*/
like image 783
salyela Avatar asked Sep 13 '26 23:09

salyela


1 Answers

I don't think VS Code provides native support for this.

There is an extension in the marketplace for this though: https://marketplace.visualstudio.com/items?itemName=stkb.rewrap.

like image 107
Saswat Padhi Avatar answered Sep 16 '26 13:09

Saswat Padhi