Would it be possible to add the underscore ("_") to the word separator characters in the Match Whole Word feature (and wholeword: modifier)? The underscore is a common word separator in source code file names, so this would be very handy for searching.
Even better would be an .ini option to add an arbitrary list of separator characters.
Add Underscore to "Whole Word" Separator Characters
Re: Add Underscore to "Whole Word" Separator Characters
Can't you just type the _ & the following wanted word?
00-crazy_frog-stupid_animal-2005.m3u
03-crazy_frog-popcorn.mp3
Finds something:
file: ww:crazy
file: ww:crazy_frog
file: ww:crazy_frog-
file: ww:crazy_frog-popcorn
Does not find anything:
file: ww:crazy_ <finds nothing
file: ww:crazy_frog-s < finds nothing
00-crazy_frog-stupid_animal-2005.m3u
03-crazy_frog-popcorn.mp3
Finds something:
file: ww:crazy
file: ww:crazy_frog
file: ww:crazy_frog-
file: ww:crazy_frog-popcorn
Does not find anything:
file: ww:crazy_ <finds nothing
file: ww:crazy_frog-s < finds nothing
Re: Add Underscore to "Whole Word" Separator Characters
You could do that, if you were searching for a specific file and knew the details of the file name. However if you were searching across multiple hard-drives and thousands of files, and wanted to find all occurrences of eg " frog ", "frog,", "_frog_", etc, but not "frogs", then wholeword: would miss the "_frog_" files because of the underscores. Note that "ww:crazy" would not return either of your example files.
It's possible to use a regular expression to accomplish this, eg "regex:[^a-z]frog[^a-z]", but I do searches like this all the time and it would be very handy to have "_" included in wholeword:, at least as an option.
It's possible to use a regular expression to accomplish this, eg "regex:[^a-z]frog[^a-z]", but I do searches like this all the time and it would be very handy to have "_" included in wholeword:, at least as an option.
Re: Add Underscore to "Whole Word" Separator Characters
Ah, you're right again. I must have had Match Path set at the time.Note that "ww:crazy" would not return either of your example files.
Re: Add Underscore to "Whole Word" Separator Characters
Somewhat related, Filter: ignore.
Re: Add Underscore to "Whole Word" Separator Characters
Treating _ as part of the word makes sense for programming languages, not so much filenames.
I'll consider treating _ as a word break.
Thanks for the suggestion.
I'll consider treating _ as a word break.
Thanks for the suggestion.