Hi Raleigh,

This Applescript snippet 
<https://gist.github.com/mixio/9d9a7cd873b931341e34042233b8ef7e> is a bit 
of a hack that takes advantage of Unicode combining codepoints to create a 
p͇s͇e͇u͇d͇o͇ ͇u͇n͇d͇e͇r͇l͇i͇n͇e͇ ͇s͇t͇y͇l͇e͇.

It works by inserting the combining underline codepoint (U+0347 COMBINING 
EQUALS SIGN BELOW) after each character of the selection, skipping 
linefeeds.

Applying the script on a selection will u͇n͇d͇e͇r͇l͇i͇n͇e͇ it.

Applying the script on a selection that already contains some 
u͇n͇d͇e͇r͇l͇i͇n͇e͇ will remove all the selection's underlines.

Applying the script when all of the document is selected (after a 
"Select All") will removes all the document underlines.

You can find / replace / mark the u͇n͇d͇e͇r͇l͇i͇n͇e͇d͇ ͇s͇e͇c͇t͇i͇o͇n͇s͇ 
with this regular expression:

    ((?:(?:.\x{0347})+\n?)+)

HTH

Jean Jourdain
On Friday, January 7, 2022 at 7:03:48 PM UTC+1 Patrick Woolsey wrote:

> On 1/7/22 at 11:28 AM, [email protected] (Raleigh Rinehart) wrote:
>
> >I was wondering if there is a way to set a specific style for 
> >particular text matches, regardless of what language is 
> >selected for the document.
> >
> >[...]
> >
> >What I am looking for is[...] to be able to select some text 
> >and "mark" it with a highlight or different style permanently 
> >(until explicitly cleared/"un-marked" by the user).
>
>
> I regret there is not; the closest it's feasible to come at 
> present would be to create a codeless language module, within 
> which you can define any desired custom elements.
>
> This is however a "fixed", string/pattern-driven solution rather 
> than an interactive one of the sort you describe.
>
> (NB: We have previously gotten other requests for this general 
> capability and it is on our radar; further than that, I cannot 
> speculate. :-)
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. <https://www.barebones.com/>
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/ad6f5f70-3534-4e6f-8f8f-42c13101e37fn%40googlegroups.com.

Reply via email to