billthefarmer / editor

Android simple text editor
https://billthefarmer.github.io/editor
GNU General Public License v3.0
478 stars 85 forks source link

Search case insensitive #155

Closed zounp closed 3 years ago

zounp commented 3 years ago

Thanks for editor. It would be nice if the search is case insensitive. For most of my searches it is irrelevant if there are capital letters involved or not. If I do not know if "happy' starts with a capital letter have to search twice for "Happy" and "happy" to find every happy Alternative solution: Make it an option. Thanks

billthefarmer commented 3 years ago

See #154, complete with solution.

zounp commented 3 years ago

Thanks. Forgot to search. I had the impression there were no closed issues. Read #154 [a,A,] is 11 taps, (?i)a is 9 taps compared to 'a' just one. I think [a,A,] / (?i)a is for 99% all I need for a search so I do not think I need regular expressions that much. Nice to have though. I think it still would be nice to have a setting to choose between case insensitive and regular expression search.

billthefarmer commented 3 years ago

(?i) is a long tap on 'k', a long tap on 'm', 'i', and a long tap on 'l'. Square brackets are a pain, but they're on 'o' and 'p' on my Samsung tablet, with a better keyboard. This app already has too many options, I'm trying to keep it simple. Regex search was an enhancement request – #16.

zounp commented 3 years ago

Indeed, (?i) can be done with long taps. That is workable. It solves the issue for me. Thanks for the feedback and of course for the nice editor :-) Some feedback from me: I use editor with the Retro theme and the monospace typeface

billthefarmer commented 3 years ago

A better idea, if you're looking for a word, but not sure of the initial case, is to start typing in the word without the first letter. Because the search is interactive, it will probably find the first instance before you finish typing. Unless it's camelCase.

zounp commented 3 years ago

Yes, indeed, thanks for the idea. I did that too. I works but I found it a bit of a hassle, annoying. Then I thought it would be nice to have an option to be able to turn case sensitive search of. I think most people who use search do not care about search being case sensitive, they just want to search. It can be even more intuitive: Make search case insensitive by default and if you need case sensitive search use RegEx. It does not require a new option, only a little change in the code.

billthefarmer commented 3 years ago

I won't be making any changes because regular expressions are a well known documented entity with a long history and users will expect them to behave as such.

hueldoeu commented 2 years ago

does (?i) still work? 1.74 here