Highlight specialtext in different color possible ?

Discuss syntax highlighting or submit new syntax files.
Post Reply
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Highlight specialtext in different color possible ?

Post by micha_he »

I would like to highlight specific text in a different color.

Autoit local functions [_abc(x,...) or _xyz_2(x,y,...)] be displayed as normal text in AutIt syntax file.

Can i define a RegEx or similar for a keyword-group ? The functionnames begin often with a '_', end before next delimiter like '(', space etc. and may not be included in other keyword-groups (higher priority).

Thanks for help...
Micha
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight specialtext in different color possible ?

Post by Rickard Johansson »

Yes! Maybe something like this (not tested...)

[Keywords]
#Function names=_[0-9a-fA-F_]+
...
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight specialtext in different color possible ?

Post by micha_he »

I have test with "#Own functions=\b_[0-9a-zA-Z_]+" and shorter with "#Own functions=\b_[\w]+".
But the highlighter sometimes mark only a part like here:
HighlighterTest.jpg
HighlighterTest.jpg (27.67 KiB) Viewed 17636 times
Where's my mistake ?
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight specialtext in different color possible ?

Post by micha_he »

The length of the marked funktionname (black, underline in Example), depends on how many characters left of the ' = '-delimiter.

A bug or my mistake ??? It seems, that '\b' (begin of word) not fully working !

In other RegEx-Tester it works.
User avatar
micha_he
Posts: 570
Joined: 24 Jul 2011 12:16
Location: Helmstedt, NDS, Germany

Re: Highlight specialtext in different color possible ?

Post by micha_he »

Hi Rickard. Can you comment this conspicuity ?

Thanks
Micha
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: Highlight specialtext in different color possible ?

Post by Rickard Johansson »

It's a bug and it's been fixed in v8.62. Thanks!
Post Reply