Underscores ignored in Search?
CompletedI use a prefixing system where I put an underscore and a tag as a file name grouping. So I have about 1000 files that all start with:
_Music
_Photog
_Tech
_Leader
The sole purpose of the underscore is so that in searching I can filter file names as I would not have "_Music" in the content of a file. This is a take off on a Merlin Mann technique where he would do "Musicx" with the x added on the end.
I am new to nvUltra and have just found that the Search is disregarding the underscore. So my search for _Music is the same as Music and undermines my whole system. In fact, as soon as I hit _ my list of files is blank.
Is this expected behavior? If so, can I put in a feature request?
Thanks,
Rob.
-
I consolidated some discussion of search here:
https://multimarkdown.zendesk.com/hc/en-us/community/posts/360049899593-Discussion-of-search
As for hyphens, I'll look at this. Hyphens/underscores are supported as intra-word characters (so "foo_bar" works), but it appears the distinction here is that the hyphen isn't "intra-word" but "pre-word". Because hyphens are treated differently than other punctuation, I have fixed this so that "_foo" is still indexed with the hyphen.
However, this won't quite give you the results you are looking for since "_foo" is also indexed as "foo", just like "foo_bar" is also indexed as "foo" and "bar". So when you search for "_Music", you will also get matches for "Music". This is intentional, since searching for "bar" should match a file that contains "foo_bar".
0 -
Thanks for the explanation (and details on your search algo). As you surmise, not the answer I was looking for. Coming from nvAlt, this is a big change for my little file naming quirk. I know this is not a 1-1 replacement of nvAlt, but sill a frustration.
I may end up dropping my prefixes, not only for this reason.
I just never liked the look of Musicx in my file names, but _Music (since they all started with an underscore) served my purpose.
Ironically I was just reading an article on different forms of Lock In and even among sets of programs that use .MD files, there are features and implementation differences.
Progress. Sigh.
0 -
Just to circle back on this, I used this and Obsidian as a reason to get rid of my file name prefixes. It was a bit of work (and not fully complete), but in the end I like it better.
You can close this item from my perspective.
0
Please sign in to leave a comment.
Comments
3 comments