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

vim: Add sneak motion (continued) #21067

Closed
wants to merge 6 commits into from
Closed

Conversation

vultix
Copy link
Contributor

@vultix vultix commented Nov 22, 2024

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 the s and S shortcuts by default.

Closes #13858

Release Notes:

  • Added support for the popular vim_sneak plugin. This is disabled by default, and can be enabled by setting "enable_vim_sneak": true in your vim settings.

Reference:
https://github.com/justinmk/vim-sneak

mrkajetanp and others added 2 commits November 21, 2024 16:45
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
@vultix vultix changed the title vim: Add sneak motion vim: Add sneak motion (continued) Nov 22, 2024
@notpeter notpeter added the cla-signed The user has signed the Contributor License Agreement label Nov 22, 2024
@vultix
Copy link
Contributor Author

vultix commented Dec 1, 2024

@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!

@ConradIrwin
Copy link
Member

It's on my list, this one is a bit larger and I didn't have time last week.

@ConradIrwin
Copy link
Member

@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

@ConradIrwin ConradIrwin self-assigned this Dec 10, 2024
@ConradIrwin
Copy link
Member

Closing for now, but still interested in getting this merged!

@ConradIrwin ConradIrwin closed this Jan 6, 2025
@nilehmann nilehmann mentioned this pull request Jan 7, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 10, 2025
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]>
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.

vim: Add sneak motion
4 participants