ATSynEdit: highlight start and end brackets

All questions regarding lexer highlighting schemes are discussed here...
Post Reply
ruma1974
Posts: 11
Joined: 23.08.2019 16:12

ATSynEdit: highlight start and end brackets

Post by ruma1974 »

I am not sure if "highlighting (e.g. by bold or underline) start and end bracket/quote/parenthesis" is an option for the ATsynedit or if it can be specified in a lexer and how to do it. I did not see it implemented in any of the demos for ATsynedit nor in CudaText.

I find this feature very useful for many languages especially for the brackets.

Thanks,

Rune
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

You can hilite brackets in 2 ways
1-- in the lexer properties, add Range: opening rule finds (, closing rule finds ), 2 rules are linked. Then for this Range, set it to highlight range tokens, only bounding tokens of range. It is option in the lexer props dialog in Synwrite.

2-- find brackets by pascal code, then use ATSynEdit.Attribs object
https://wiki.freepascal.org/ATSynEdit#Attribs_object
ruma1974
Posts: 11
Joined: 23.08.2019 16:12

Post by ruma1974 »

I ended up using method to using the add marks function because I do not fully master the lexer syntax.

Thanks,

Rune
Post Reply