"A.J.Mechelynck" <[EMAIL PROTECTED]> wrote on 2007-01-04 18:18:39: > [EMAIL PROTECTED] wrote: > > Hi vimmers, I've got some question when writing my syntax highlight script. > > > > Q1. > > The language requires a ^M character as a keyword. The ^M character is by > > default highlighted but I want to highlight it to some other color, at > > least it should be different from ^L and ^N... > > > > It seems impossible to match the ^M by > > :syn match Testgroup "^M" > > (Note the ^M is obtained by press C-K, release, then press C-M, release, > > then press <Enter>) > > When using double quotes, you can match "\r" instead, but beware: ^M is the > carriage-return character, which has special meaning on Mac (where is is the > end-of-line character) and on Dos/Windows (where it, plus ^J [line feed] > together make an and-of-line). In general, using any character below0x20 as a > "text" character is a bad choice.
The fact is that the script language requires the source be in Unix format on all platforms, so there should not be problem using ^M. (AFAIK Mac is using FreeBSD kernel, isn't FreeBSD using Unix format?) However, your solution does not seem to work. Changing "^M" to "\r" does not get it highlighted correctly. -- Sincerely, Pan, Shi Zhu. ext: 2606
