On Tue, Jan 8, 2013 at 12:10 PM, Boris Danilov <brdanilov@gmail.com> wrote:
> :syntax match ARecord_RecordType "^A" nextgroup=ARecord_RecordCount
> :syntax match ARecord_RecordCount ".\{9}" nextgroup=ARecord_OriginatorID
> :syntax match ARecord_OriginatorID ".\{10}"
>
> :syntax match CRecord_RecordType "^C" nextgroup=CRecord_RecordCount
> :syntax match CRecord_RecordCount ".\{9}" nextgroup=CRecord_OriginatorID
> :syntax match CRecord_OriginatorID ".\{14}"
>
> :highlight link ARecord_RecordType RecordType
> :highlight link CRecord_RecordType RecordType
>
> :highlight link ARecord_RecordCount RecordCount
> :highlight link CRecord_RecordCount RecordCount
>
> :highlight link ARecord_RecordOriginatorID RecordOriginatorID
> :highlight link CRecord_RecordOriginatorID RecordOriginatorID
>
> :highlight RecordType ctermfg=blue
> :highlight RecordCount ctermfg=red
> :highlight RecordOriginatorID ctermfg=yellow
I'm sorry, there is a mistake. To prevent XRecord_RecordOriginatorID
and XRecord_RecordCount match anywhere I believe you should mark them
as contained elements like this:
:syntax match ARecord_RecordCount ".\{9}"
nextgroup=ARecord_OriginatorID contained
:syntax match ARecord_OriginatorID ".\{10}" contained
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Tuesday, January 8, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment