pepper
pepper copied to clipboard
Add align selections
Align selections is a crucial and very frequently use action (example) that I really miss when switch to Pepper. From Kakoune's keys docs:
& : Align selections, align the cursor of each selection by inserting spaces before the first character of each selection.
At first this seems like a complex feature. From looking at the example gif, it seems that it detects that there are two columns and align cursors accordingly. What happens if there's a different number of cursors on each line? Does it try to match the closest cursors along each column? Or does it simply match the nth cursor of each line? Or something different?
Also, this is certainly something that could be accomplished today by a code plugin.
What happens if there's a different number of cursors on each line? Does it try to match the closest cursors along each column? Or does it simply match the nth cursor of each line? Or something different?
I have come back to Kakoune and play around a bit to confirm that: Yes "it simply match the nth cursor of each line"!
Before | After |
---|---|