wincent / loupe

🔍 Enhanced in-file search for Vim
BSD 2-Clause "Simplified" License
144 stars 6 forks source link

Request: option to prevent * from jumping to next match #12

Open jdsutherland opened 7 years ago

jdsutherland commented 7 years ago

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?

john-kurkowski commented 6 years ago

There are other plugins that do that. For example, inkarkat/SearchHighlighting. It also mentions several related works.

wincent commented 6 years ago

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.

jaydorsey commented 4 years ago

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)

sanpii commented 3 years ago

I added these lines in my ~/.vim/after/plugin/loupe.vim:

nmap <silent> * <plug>(LoupeStar)``
nmap <silent> # <plug>(LoupeOctothorpe)``