Page 1 of 1

AWK syntax highlighting

Posted: Thu May 19, 2005 3:48 am
by dtksh
Here's a tip for anyone using the AWK syntax definition, awk.syn, available from the add-ons page (www.textpad.com/add-ons/syna2g.html).

I found that if I change the first line of the file from 'C=1' to 'PERL=1', TextPad will correctly highlight regexp constants that contain the '#' comment character, e.g:

/^#$/

If C=1, the '#' character will be treated as the start of a comment and highlighted accordingly. If PERL=1, it will be treated, correctly, as a literal '#'.

D.