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

Add set_jumps option to select module #567

Open
pockata opened this issue Feb 14, 2024 · 0 comments
Open

Add set_jumps option to select module #567

pockata opened this issue Feb 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pockata
Copy link
Contributor

pockata commented Feb 14, 2024

Is your feature request related to a problem? Please describe.
Oftentimes I find myself selecting the wrong textobject (eg, vac instead of vax) or just needing to go back to the place my cursor was before I performed the textobject selection. There's no instant way to go back. You have to use vim motions to go to your original position. This is a bit inconvenient because textobjects from wellle/targets.vim add the cursor position to the jumplist just like set_jumps for the move module. So from time to time that muscle memory kicks in and you go back in the jumplist only to find yourself not where you'd expect.

Describe the solution you'd like
Add the option set_jumps, which is present in the move module to the select module. It should default to false for backward compatibility.

Describe alternatives you've considered
None, currently.

Additional context
Textobjects from wellle/targets.vim have the same jumplist functionality enabled by default for a few textobjects, but can optionally be enabled for all of them.

The implementation in targets.vim here and the move module here are functionally the same, so we can reuse the same implementation in select and have consistency between the two plugins.

I can prepare a PR if there's interest in this functionality.

@pockata pockata added the enhancement New feature or request label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant