kevinhwang91 / nvim-hlslens

Hlsearch Lens for Neovim
BSD 3-Clause "New" or "Revised" License
748 stars 10 forks source link

* search forward support #38

Closed Integralist closed 2 years ago

Integralist commented 2 years ago

Is your feature request related to a problem? Please describe. I use <Shift-8> (i.e. * forward search) and <Shift-3> (backward search) for the word under the cursor, and I realised this plugin doesn't support that.

Describe the solution you'd like The ability to press * and have the current word under my cursor become the search term so I don't have to type out the word manually.

kevinhwang91 commented 2 years ago

I don't know what you are talking about.

Integralist commented 2 years ago

Basically I was referring to * which in vim triggers a forward search of the word under the cursor.

e.g. if my buffer looks like the following...

foo
bar
foo
baz

...if my cursor is on the word foo in the first line and I press * then vim starts a forward search to the next occurrence of the word foo.

But the hlslens plugin doesn't activate if I do that. It'll only activate if I type a search /foo. This is fine, but if I have a longer word I'm searching for, then being able to just press * is much more convenient than manually typing the word.

kevinhwang91 commented 2 years ago

https://github.com/kevinhwang91/nvim-hlslens#vim-asterisk