bronson / vim-visual-star-search

Start a * or # search from a visual block
http://got-ravings.blogspot.com/2008/07/vim-pr0n-visual-search-mappings.html
181 stars 36 forks source link

override ignorecase #9

Closed cizmazia closed 4 years ago

cizmazia commented 4 years ago

Would you consider noignorecase as a reasonable default for visual star search?

bronson commented 4 years ago

Personally I would expect it to work the same way as other searches. (which I think is current behavior)

Help me understand why you want to make this change?

cizmazia commented 4 years ago

I see. It probably makes more sense to keep it aligned with the default Vim behavior then.

I have understood ignorecase and smartcase more as a convenience for interactive search where a user types out the phrase character by character without bothering about the case. I would expect exact match from the visual search, because I tend to use it for complex phrases.

bronson commented 4 years ago

Your expectation may be better. I’m not sure. Happy to leave this open for others to comment if you want.

On Fri, Jun 19, 2020 at 1:07 PM Michal Cizmazia notifications@github.com wrote:

Closed #9 https://github.com/bronson/vim-visual-star-search/pull/9.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/bronson/vim-visual-star-search/pull/9#event-3463753241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAN4F24ATIKLTUXJHQ43TRXPAPXANCNFSM4OCBOWFA .

cizmazia commented 4 years ago

Thanks for your response! Vim itself is inconsistent, because ignorecase is applied for * while smartcase is not. From the documentation:

Not used for "*", "#", "gd", tag search, etc.

Since ignorecase is global, I will create a shortcut for switching it on and off, so that gd may work correctly as well.