editor: Add align selections action#44769
Merged
SomeoneToIgnore merged 5 commits intozed-industries:mainfrom Mar 18, 2026
Merged
editor: Add align selections action#44769SomeoneToIgnore merged 5 commits intozed-industries:mainfrom
SomeoneToIgnore merged 5 commits intozed-industries:mainfrom
Conversation
94efce4 to
eb06cfd
Compare
Contributor
Author
|
I've just tried to avoid the multiple calls for I'm sure that the order of the |
Member
|
Not having looked at the PR but you likely will have more luck by using Anchors instead of Points here |
Contributor
Author
It worked! thanks for the advice! @Veykril |
SomeoneToIgnore
approved these changes
Mar 18, 2026
Contributor
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Sorry for the late reply, and thank you for the PR, looks nice.
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 18, 2026
Closes zed-industries#17090 Hello! This is a feature that I really wanted, so I've created an implementation of it. Hope u guys like it. It was alto mentioned at [this discussion](zed-industries#30473) The use cases were based on the [vscode extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align) (only spaces case was implemented) - The algorithm is O(n + m × 2k), where: - n = total cursors (for initial analysis, to understand how many alignments will be performed) - m = number of alignment columns - k = number of alignment rows (first time to get the most-right occurrence, the next one to create the `Vec` of edits) Release Notes: - Added `editor: align selections` command  <br> Thank you for creating zed! --------- Co-authored-by: Kirill Bulatov <[email protected]>
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 20, 2026
Closes zed-industries#17090 Hello! This is a feature that I really wanted, so I've created an implementation of it. Hope u guys like it. It was alto mentioned at [this discussion](zed-industries#30473) The use cases were based on the [vscode extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align) (only spaces case was implemented) - The algorithm is O(n + m × 2k), where: - n = total cursors (for initial analysis, to understand how many alignments will be performed) - m = number of alignment columns - k = number of alignment rows (first time to get the most-right occurrence, the next one to create the `Vec` of edits) Release Notes: - Added `editor: align selections` command  <br> Thank you for creating zed! --------- Co-authored-by: Kirill Bulatov <[email protected]>
toshmukhamedov
pushed a commit
to toshmukhamedov/zed
that referenced
this pull request
Mar 20, 2026
Closes zed-industries#17090 Hello! This is a feature that I really wanted, so I've created an implementation of it. Hope u guys like it. It was alto mentioned at [this discussion](zed-industries#30473) The use cases were based on the [vscode extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align) (only spaces case was implemented) - The algorithm is O(n + m × 2k), where: - n = total cursors (for initial analysis, to understand how many alignments will be performed) - m = number of alignment columns - k = number of alignment rows (first time to get the most-right occurrence, the next one to create the `Vec` of edits) Release Notes: - Added `editor: align selections` command  <br> Thank you for creating zed! --------- Co-authored-by: Kirill Bulatov <[email protected]>
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 23, 2026
Closes zed-industries#17090 Hello! This is a feature that I really wanted, so I've created an implementation of it. Hope u guys like it. It was alto mentioned at [this discussion](zed-industries#30473) The use cases were based on the [vscode extension](https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align) (only spaces case was implemented) - The algorithm is O(n + m × 2k), where: - n = total cursors (for initial analysis, to understand how many alignments will be performed) - m = number of alignment columns - k = number of alignment rows (first time to get the most-right occurrence, the next one to create the `Vec` of edits) Release Notes: - Added `editor: align selections` command  <br> Thank you for creating zed! --------- Co-authored-by: Kirill Bulatov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17090
Hello! This is a feature that I really wanted, so I've created an implementation of it. Hope u guys like it.
It was alto mentioned at this discussion
The use cases were based on the vscode extension (only spaces case was implemented)
Vecof edits)Release Notes:
editor: align selectionscommandThank you for creating zed!