-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
vim: Add sneak motion (continued) #21067
Conversation
Implement support for the vim sneak motion from the vim-sneak plugin. The motion jumps forward or backward to any location specified by two characters. The Sneak & SneakBackward operators are bound to 'z' and 'Z' by default to avoid overwriting the 's' and 'S' default keybindings, similar to the way the original plugin uses 'z' with operators to avoid conflicts. Reference: https://github.com/justinmk/vim-sneak
# Conflicts: # crates/vim/src/vim.rs
@ConradIrwin I saw you approved my other vim PR, just pinging you to make sure this hasn't accidentally fallen by the wayside. Thank you for the help! |
It's on my list, this one is a bit larger and I didn't have time last week. |
@vultix Thanks for this! The sneak code looks good to me. I'd like to not add a setting for this, but instead document how to set up the bindings (as we do for subword motions, and vim surround). Happy to pair with you on making that change if you want: https://calendly.com/conradirwin/pairing |
Closing for now, but still interested in getting this merged! |
A (re)continuation of #21067. This takes the original implementation in #15572 and adds the test in #21067. Then, as requested in #21067 (comment), it documents how to map a keybinding instead of having a setting. Closes #13858 Release Notes: - Added support for the popular [vim_sneak](https://github.com/justinmk/vim-sneak) plugin. This is disabled by default and can be enabled by binding a key to the `Sneak` and `SneakBackward` operators. Reference: https://github.com/justinmk/vim-sneak --------- Co-authored-by: Kajetan Puchalski <[email protected]> Co-authored-by: Aidan Grant <[email protected]> Co-authored-by: Conrad Irwin <[email protected]>
This is a continuation of the abandoned #15572 pull request.
As requested in that PR, I added tests and a new
enable_vim_sneak
setting so we don't override thes
andS
shortcuts by default.Closes #13858
Release Notes:
"enable_vim_sneak": true
in your vim settings.Reference:
https://github.com/justinmk/vim-sneak