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

Highlight the whole match under cursor #309

Open
tuurep opened this issue Jan 30, 2025 · 4 comments
Open

Highlight the whole match under cursor #309

tuurep opened this issue Jan 30, 2025 · 4 comments

Comments

@tuurep
Copy link

tuurep commented Jan 30, 2025

I've always been bothered with the inconsistent feeling with / highlighting and s highlighting, like this:

/ol

Image

sol

Image

I've solved this for myself with quite a tiny change here:

tuurep@0851d25

Demo:

simplescreenrecorder-2025-01-30_01.35.23.mp4

Would you like to get this added? If yes, we should probably:

  1. Add a highlight group SneakCurrent or similar name
  2. Handle the case of magic vs nomagic if needed
  3. Allow to be used with an a:inputlength higher than 2 as well
@justinmk
Copy link
Owner

Yes this makes sense. That Vim feature is fairly new relative to Sneak :)

@tuurep
Copy link
Author

tuurep commented Jan 30, 2025

Ah, that's right, I already forgot that before CurSearch highlight group was added, I used a plugin to try to do what it does.

Hl group could even be named CurSneak :)

Would you like the default color for the new hl group to be:

  • off, so people don't get surprises when updating
  • "hideous magenta" or similar, to incentivize changing it to one's liking?

@justinmk
Copy link
Owner

on by default sounds good. I think for consistency the highlight name should start with Sneak*.

and instead of making it an option, we can just document how to link SneakCurrent to the main sneak highlight.

@tuurep
Copy link
Author

tuurep commented Jan 30, 2025

Yes, to be clear by off I was thinking: link = "None"

I can start putting this together in a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants