Skip to content

Conversation

@scorphus
Copy link

Introduces RotateForward and RotateBackward actions that rotate content in a circular fashion across multiple cursors.

Behavior based on context:

  • With selections: rotates the selected text at each cursor position (e.g., x=1, y=2, z=3 becomes x=3, y=1, z=2)
  • With just cursors: rotates entire lines at cursor positions (e.g., three lines cycle to line3, line1, line2)

Selections are preserved after rotation, allowing repeated cycling. Useful for quickly rearranging values, lines, or arguments.

For more examples and use cases, please refer to #5315.

I'm eager to read your thoughts and make any adjustments or improvements to any aspect of this change.

Closes #5315

Release Notes:

  • Added RotateForward and RotateBackward actions that rotate content in a circular fashion across multiple cursors

Introduces RotateForward and RotateBackward actions that rotate content
in a circular fashion across multiple cursors.

Behavior based on context:
- With selections: rotates the selected text at each cursor position
  (e.g., x=1, y=2, z=3 becomes x=3, y=1, z=2)
- With just cursors: rotates entire lines at cursor positions
  (e.g., three lines cycle to line3, line1, line2)

Selections are preserved after rotation, allowing repeated cycling.
Useful for quickly rearranging values, lines, or arguments.

Fixes zed-industries#5315
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 26, 2025
@scorphus scorphus force-pushed the editor-rotate branch 2 times, most recently from f560730 to cb7aacf Compare October 31, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support transpose selections

1 participant