summaryrefslogtreecommitdiff
path: root/runtime/syntax/lex.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-12-10 20:35:50 +0100
committerBram Moolenaar <Bram@vim.org>2010-12-10 20:35:50 +0100
commit81af9250a7655e54e4f744f2e193ecd5655336a4 (patch)
treed0f914f475b2472326c6f2b9234b39e2b3608831 /runtime/syntax/lex.vim
parent7c5676b5d68249dabd86bb1da542ba4f103bee07 (diff)
downloadvim-81af9250a7655e54e4f744f2e193ecd5655336a4.zip
Update runtime files.
Diffstat (limited to 'runtime/syntax/lex.vim')
-rw-r--r--runtime/syntax/lex.vim14
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim
index 68ae63273..e500f5c07 100644
--- a/runtime/syntax/lex.vim
+++ b/runtime/syntax/lex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Lex
" Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Sep 11, 2009
-" Version: 10
+" Last Change: Nov 01, 2010
+" Version: 12
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Option:
@@ -36,6 +36,9 @@ endif
" --- Lex stuff ---
" --- ========= ---
+" Options Section
+syn match lexOptions '^%\s*option\>.*$' contains=lexPatString
+
"I'd prefer to use lex.* , but vim doesn't handle forward definitions yet
syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatTagZoneStart,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
@@ -61,13 +64,15 @@ endif
"%% : Patterns {Actions}
if has("folding")
- syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat
+ syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
+ syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained
syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
else
- syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat
+ syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
+ syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained
syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
endif
@@ -117,6 +122,7 @@ hi def link lexAbbrvRegExp Macro
hi def link lexAbbrv SpecialChar
hi def link lexCFunctions Function
hi def link lexMorePat SpecialChar
+hi def link lexOptions PreProc
hi def link lexPatComment Comment
hi def link lexPat Function
hi def link lexPatString Function