loupe
loupe copied to clipboard
Request: option to prevent * from jumping to next match
When I use *
, I prefer not to automatically jump. Here is a reddit thread expressing support/use cases of this idea. I have similar uses to what a user mentioned:
...I want to highlight a given word (think typos in an article), or perform a count, or perform a global replacement.
I'm not sure how to make this work with loupe. My first thought was to chain N
(something like nnoremap * <Plug>(LoupeStar)N
) but this doesn't seem to work (can <Plug>
calls be chained?).
Thoughts?
There are other plugins that do that. For example, inkarkat/SearchHighlighting. It also mentions several related works.
This is a good idea. One I initially hesitated to pursue because I don't like deviating too far from Vim defaults. Thanks for the links.
is.vim has a similar config option
I also find it useful (it doesn't seem to chain with loupe like shown in that link, however)
I added these lines in my ~/.vim/after/plugin/loupe.vim
:
nmap <silent> * <plug>(LoupeStar)``
nmap <silent> # <plug>(LoupeOctothorpe)``