Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for evil-exchange / vim-exchange #22759

Open
1 task done
thomasheartman opened this issue Jan 7, 2025 · 0 comments
Open
1 task done

Support for evil-exchange / vim-exchange #22759

thomasheartman opened this issue Jan 7, 2025 · 0 comments
Labels
enhancement [core label] vim

Comments

@thomasheartman
Copy link

Check for existing issues

  • Completed

Describe the feature

I'd love to be able to exchange things in vim mode, similar to how evil-exchange works.

Presumably, this is also how vim-exchange works, although I've only used the Emacs version. The bindings appear to be different (I think I prefer the evil bindings), but that can be reassigned by the user, so it's not particularly important, I think.

In essence, it allows you to (using evil bindings), gx a motion or object to store it in an exchange register. The next time you gx something outside of your original selection, those to selections change place. gX clears the register.

E.g., with | as a caret:

This is an ex|ample.
This is a line.

gxiw puts example into the exchange register.

This is an example.
This is a li|ne.

gxiw swaps line and example because example was in the register:

This is an line.
This is a example.

The motions / selections don't have to be the same. It'd be helpful if the selection in the exchange register remained highlighted in some way until the exchange has taken place.

Zed Version and System Specs

Zed: v0.167.1 (Zed)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@thomasheartman thomasheartman added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jan 7, 2025
@JosephTLyons JosephTLyons added vim and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] vim
Projects
None yet
Development

No branches or pull requests

2 participants