On 5/1/06, Michael Naumann <[EMAIL PROTECTED]> wrote:
Is there a way to highlight a sequence of non-tabs followed by a sequence
of tabs (/^[^\t]\+\t\+/) differently from the next such sequence?
For example in the line
"a\t" to be color1,
"b\t\t" to be color2 and
"c\t" to be color3 (or probably color1 again)
Yes this is possible using custom syntax highlighting.
The commands below do what dou ask for.
syn match Field1 /^[^\t]\+\t\+/ nextgroup=Field2
syn match Field2 /[^\t]\+\t*/ nextgroup=Field3 contained
syn match Field3 /[^\t]\+\t*/ nextgroup=Field2 contained
hi link Field1 Constant
hi link Field2 Operator
hi link Field3 Type
However it removes all other syntax highlighting.
If you want it to work together with other syntax, you have to
figure it for yourself.