Closed aaronjensen closed 11 years ago
Right, i see the difference. It's clearly better, but it's a bit confusing in some cases, e.g. if i search for oost
in a path like cpp/BoostParts/boost/algorightm
it will highlight only first match in BoostParts
and will skip the next match in boost
.
Is there a way to improve it?
i have some ideas...
ok, this is quite a bit more complicated, but it will match only the last-most occurrence. It's not perfect, like if you search for foouser
it's not smart enough to highlight foo/group_user
perfectly (the u in group
will be highlit instead of the u in user
) but it's pretty darn good.
This is nice. Just 2 more simple requests: please make it case insensitive (currently search for boost
does not highlight Boost
correctly) and please add some generic comments in code about regexps and it will be good to merge.
Ok, give it a look. The regexp is still pretty complicated, but hopefully the comments shed some light.
also let me know if you want me to squash these into one commit
Awesome, big thanks for the contribution! I've merged it but forgot to add close message for this PR, so closing it manually. Thanks again!
Hopefully addresses #7 I only changed the regular highlighting, I haven't tested the other versions.
There are a couple of whitespace changes in there as well, if that's OK, let me know