thinca / vim-visualstar

star for Visual-mode.
119 stars 5 forks source link

Feature request: add option to immediately return to normal mode after search #9

Closed jyscao closed 3 years ago

jyscao commented 3 years ago

Could you add a user option to allow immediately exiting visual mode after performing the search? I mostly use visual star search to create the search query, then just use n and N to search in the buffer.

BTW I'm a big fan of all your work and everyone at the vim-jp group, especially vital.vim!

kuuote commented 3 years ago

I'm trying this plugin now, default behavior is immediately exiting visual mode. Can you write reproduce step, and execution environment?

jyscao commented 3 years ago

Basically all I did was visually select some text with vi" (the text object contains a hyphenated word for instance, such that * alone isn't enough to select it for searching), then I'd press *. At this point, vim still remains in visual mode with the cursor having jumped to the next occurrence of whatever word (not the text object selected with vi") under the cursor at the time * was pressed, with all text b/w the initial point and this new word becoming visually selected.

If the plugin works as intended for you, then I'm thinking it's possible (likely even) that this behavior is due to some interaction with another plugin of mine. I don't really want to spend the time to track down the conflict right now, so I just tried vim-visual-star-search, and for my usage it's good enough.

So I'll go ahead and close the ticket. Thanks for following up anyway @kuuote