Syntax highlighting of IDL keywords
- Dear All:
I am trying to get proper syntax highlighting of keywords in IDL
(ft=idlang). Here's an example:
plot, x, /box, y, title='My Plot', z, $
IDL keywords in the above example are "box", "title" and "xlabel". I
would like to highlight "/box", "title=" and "xlabel=".
Syntax highlighting of the first two cases was trivial even for me:
1) /box -> syn match group_name ",\s*/\h\w*"hs=s+1
2) title= -> syn match group_name ",/s*\h\w*="hs=s+1
However, I ran into problems with the third case (xlabel). The way I
see it, properly highlighting a case like this requires examination of
the previous line. If the line does not end with a ",\s*\$\s*$" pattern
(the "$" sign is the line continuation character in IDL), then the
"xlabel" line is just an ordinary assignment. But I did not know how to
achieve this, despite quite an exhaustive syntax highlighting manual in
I reckon I've spent enough time trying myself, so am seeking help now
from Those Who Know More.
Many thanks in advance.