Select and wrap multiple paragraphs?
Opened this issue · 6 comments
First of all, thanks for making such a great plugin to fill the gaps!
A common need of mine is to select multiple paragraphs and wrap them. For example, when you copy a large body of text from somewhere and use them as comment. Is there a way to wrap multiple paragraphs? Thanks!
Interesting. Good point. I'll think about this!
I would like this, too. Specifically, I'd like the ability to run the tool for all paragraphs in the comment/"section" I'm in, and to run the tool for an entire file. (Maybe even also a whole solution.)
I experimented with this today after remembering that I had used the plugin to wrap multiple lines before. Try the Wrap Line to Column action. The default keyboard shortcut on Mac is Command + Control + Shift + W, but check the README for others. You can also select text and access the Intellij Command Palette, then type "Wrap" and select Wrap Line to Column.
This action is maybe not well-named -- it actually wraps all selected lines or the current line if none is selected. Give that a shot.
I just tested this with a Markdown file and a large comment block in Python, and it wrapped multiple lines decently.
Thanks. That's better, though a feature to wrap all lines in the current comment (no selection needed) would be better. Also, you can't use this for whole files (with code in between the comments).
Ah, yeah, I see what you mean. So the missing features are:
- Wrap all lines in current comment without needing selection
- Wrap all comments in the current file
Something like that?
Exactly. Or even better than the second one: wrap all comments in the current selection. Then it's easy to "select all" and do the entire file, but I could also select just part of the file, so it's more flexible.