Skip to content

Vim like alignment/wrap of selected lines across multiple paragraphs #7179

Answered by gabydd
ipochi asked this question in General
Discussion options

You must be logged in to vote

You actually can remove a selection with Alt-, which will remove the last added selection as it will be the primary one unless you rotate your primary selection.

To reflow each paragraph seperately I would split each paragraph with S split selections with regex, then use the \n\n regex, then reflow. The current reflow uses https://docs.rs/textwrap/latest/textwrap/fn.refill.html which removes newlines as such it is not aware of paragraphs and at the moment seems to only really be designed for reflowing only one paragraph per selection

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gabydd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #7176 on May 30, 2023 14:41.