Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Add align selections #56

Open
NNBnh opened this issue May 1, 2022 · 2 comments
Open

Add align selections #56

NNBnh opened this issue May 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@NNBnh
Copy link
Contributor

NNBnh commented May 1, 2022

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.

@NNBnh NNBnh changed the title Support align selections Add align selections May 1, 2022
@vamolessa
Copy link
Owner

vamolessa commented May 3, 2022

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.

@NNBnh
Copy link
Contributor Author

NNBnh commented May 7, 2022

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
Before After

@vamolessa vamolessa added the enhancement New feature or request label Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants