-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 highlight group for current match #2819
Comments
Which patch do you refer to? Patch 8.0.0128 is: Display test fails on MS-Windows. |
Sorry, missing a digit: I meant 1238. |
The Loupe plugin does this:
It implements this using |
There's also a recent r/vim thread that suggests the vim-searchhi plugin as well as an ad hoc scripting solution. |
There's also vim-searchlight, which uses no mappings |
For reference, there's a WIP PR for Neovim at: neovim/neovim#11082 |
It's not really the current match, more like the "last found match". If you move the cursor around and hit "n" then only the cursor position matters, not what was found last. |
Loupe provides a really nice search experience, but it has two downsides based on how it's currently implemented: 1. It remaps most of the built-in search commands. 2. Due to 1, we lose vim's built-in `[x/y]` search statistic. Neither of these is a major issue, but I thought I'd explore alternatives nonetheless. I ultimately found good results with vim-searchlight (to make the current match more visible) and vim-cool (to turn off highlighting when the cursor moves off of a match). I no longer center search results, but I could easily restore that behavior with something like `nnoremap n nzz`, et al. It would be great if vim provided the ability to distinctly highlight the current match, which would make vim-searchlight redundant. That's being tracked as vim/vim#2819.
The aim of CurSearch is to let the user highlight the current match without having to resort to overcomplicated plugins to approximate this simple feature. Closes vim#2819
I'll throw my hat in the ring: https://github.com/airblade/vim-current-search-match Update: never mind, I just saw 8.2.4724. |
Closing then: a43993897aa372159f682df37562 |
After patch 8.0.1238, it would be nice if the current match had its own highlight group (that could be linked by default to the regular Search hl group).
The text was updated successfully, but these errors were encountered: