2
votes

I'm seeking a command that when I highlight a paragraph of text in Visual Studio Code will let me remove all line breaks, and correspondingly a command that if I highlight a paragraph without line breaks will insert them at the end of the display width.

It wont be enough to just use Alt-Z because that just makes the display show the line wrapping but doesn't actually insert the line breaks.

For context: I'm using a VS Code latex plugin which is a compiled text editor format. Errors in this system trace back to line numbers so if you don't have line breaks you have to hunt down the error somewhere in a large paragraph. But of course this being a text document there you often have to edit paragraphs and end-of-lines become jagged and hard to read/update.

2

2 Answers

2
votes

You can set this behavior searching for "Word Wrap" in the settings. Set to "on" to wrap the words.

0
votes

Found a solution, maybe it will help someone in the future.: install "rewarp" extension. Select portion of text, and use Alt-q. Seems to work like Emacs' M-q command.