howl icon indicating copy to clipboard operation
howl copied to clipboard

buffer-search-forward case sensitive by default?

Open italomaia-bk opened this issue 5 years ago • 4 comments

Hi. Just noticed buffer-search-forward is case sensitive by default. I think that makes it harder to search a buffer, given the most common case is to do a case-insensitive search then fall back to case-sensitive if too many results appear. Could we have case-insensitive search by default?

italomaia-bk avatar May 03 '19 10:05 italomaia-bk

I personally like it as-is, but a way to make it insensitive (e.g. ctrl-I) would actually be really nice.

refi64 avatar May 04 '19 05:05 refi64

I think a case-insensitive is the most common case, but I might be wrong. If the shortcuts give priority to behave in the most common useful ways, that would probably be a good thing. More opinions?

italomaia-bk avatar Jun 18 '19 13:06 italomaia-bk

VSCode has a neat feature where the search is case-insensitive as long as there is no uppercase character in the query. I propose a config value for this, that can be set to true, false or "auto", defaulting to "auto", because this is more in line with Howls "Features enabled by default" philosophy.

Janfel avatar Aug 23 '19 00:08 Janfel

Emacs does case insensitive also until you type an uppercase letter (IIRC, it's been a while)

There's still the corner case of case sensitive matching for all lowercase text. If we do this, I prefer the toggle shortcut (e.g. pressing ctrl_i while the command is active). We have toggle features for some other commands such as open where ctrl_s will switch to recursive directory search.

I think buffer-search-forward has limited applicability because better features exist in Howl (probably just for me :smile: ). I rarely use it, but I used it a lot more in other editors. More often I use buffer-grep which does not only case insensitive but also somewhat of fuzzy matching and does the entire buffer in one shot. The second most common search I use is buffer-search-forward-word - position the cursor at a word and type ctrl_period and voila - it finds the next instance of exactly the word I was on. This is the typical 'find me the next usage of this identifier'.

shalabhc avatar Oct 21 '19 04:10 shalabhc