Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select and wrap multiple paragraphs? #33

Open
jduan opened this issue Apr 21, 2020 · 6 comments
Open

Select and wrap multiple paragraphs? #33

jduan opened this issue Apr 21, 2020 · 6 comments

Comments

@jduan
Copy link

jduan commented Apr 21, 2020

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!

@abrookins
Copy link
Owner

Interesting. Good point. I'll think about this!

@cmeeren
Copy link

cmeeren commented Nov 12, 2021

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.)

@abrookins
Copy link
Owner

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.

@cmeeren
Copy link

cmeeren commented Nov 12, 2021

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).

@abrookins
Copy link
Owner

Ah, yeah, I see what you mean. So the missing features are:

  1. Wrap all lines in current comment without needing selection
  2. Wrap all comments in the current file

Something like that?

@cmeeren
Copy link

cmeeren commented Nov 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants