The search powering Ctrl + P, Ctrl + S, [[
and so on uses some smart filtering and weighting to always show the most relevant rem. E.g.
- Matching prefixes are weighted higher than text at the end
- Text in a rem is weighted higher than text in a parent (probably)
- Text in references is ignored
- The accepted search result is recorded, so if you always select
Custom CSS
when typingcss
it will rank higher over time, even if you have aCSS Tricks
rem.
There is probably more smartness.
Since a few weighting decisions are unexpected to some users I feel the weights should be tweakable. E.g. if you don’t care for prefixes, set the weight to 0 or if you want to search for text in references, set the weight from 0 to x.
At the very least the search algorithm should be roughly documented so users know what to expect - if it does not reveal to many business secrets
I don’t know if it is intentional that Ctrl + Shift + Enter and the other searches behave differently or if this is a bug. A bit of documentation would help here as well.