I've been pouring through the syntax highlighting code and I think I've actually come up with a pretty elegant solution: custom highlighting rules
The QSyntaxHighlighter is likely the best option for this. Basically rather than matching a regex syntax in a headline you would use the newly proposed directive *@highlight*. So for the simplest example, as it relates to clone-find-all and clone-find-flat, given the search term LeoHighlighter the Found collection node would include the directive @highlight LeoHightligher. The syntax highlighter would then either highlight or underline for every instance of the string "LeoHighlighter". It feels very Leonine (directive based) and also self-explanatory/literate as the verb highlight is very explicit. I'd like to get some feedback, I would like to start to try to develop this idea, but sort of want to get it blessed before I really start studying the highlight code. On Monday, September 11, 2017 at 10:01:59 PM UTC-4, john lunzer wrote: > > I was comparing the Quick-Search plugin to Clone Find All / Clone Find > Flat today and I realized one of the reasons I prefer Quick-Search is > because it highlights my search term in the body text. I find this critical > to quickly "flipping through" search results. > > It would be awesome if each "Found" collector node could keep each > individual search term highlighted for all their respective children. I > think the syntax of the found collector node's is unique enough that auto > highlighting could actually be done completely separately to the cfa/cff > functionality. It could simply be in the form of an auto-highlight plugin > that highlighted all the search terms given a specific regex in the node > headline. > > I'd like to get some thoughts on this, hopefully I'm not missing some > obvious functionality already built into Leo. > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.