VS code: Reversible block of text or comment

How to redo a block of text or a long comment according to 80 columns?

I don’t want it to simply display word wrap (this is easy to do with Edit β†’ Toggle Word Wrap or installation "editor.wordWrap": "on"), but I want it to actually insert hard line breaks. This feature is called "fill in paragraph" in some editors.

For instance:

// This is a very long comment. I would like for this comment to occupy multiple lines rather than a single line, so that it is easy to read for other people.

Now I would like to press a key to get:

// This is a very long comment. I would like for this comment to occupy
// multiple lines rather than a single line, so that it is easy to read for
// other people.
+4
source share
2 answers

This plugin seems to do what you need. Not sure if there is still a native path. They still add many features.

https://marketplace.visualstudio.com/items?itemName=stkb.rewrap

+2
source

VSCodeVim . gq.:)

+1

Source: https://habr.com/ru/post/1672751/


All Articles