diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-08-15 17:43:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-08-15 17:43:31 +0200 |
commit | 9b4512500adfab4d44e957329d1a89e97e9a3930 (patch) | |
tree | afb71cc9c0ca20c627152976791923513e69afff /runtime/syntax | |
parent | dd82d699c8cb3e60b2da968fb40622dc497f71ca (diff) | |
download | vim-9b4512500adfab4d44e957329d1a89e97e9a3930.zip |
Update runtime files.
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/cfg.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/group.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/hgcommit.vim | 27 | ||||
-rw-r--r-- | runtime/syntax/lua.vim | 41 | ||||
-rw-r--r-- | runtime/syntax/rst.vim | 6 |
5 files changed, 56 insertions, 28 deletions
diff --git a/runtime/syntax/cfg.vim b/runtime/syntax/cfg.vim index c6e8b2953..b82fb26fc 100644 --- a/runtime/syntax/cfg.vim +++ b/runtime/syntax/cfg.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Good old CFG files " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) -" Last change: 2001 Sep 02 +" Last change: 2012 Aug 11 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -18,7 +18,7 @@ syn match UncPath "\\\\\p*" contained "Dos Drive:\Path syn match CfgDirectory "[a-zA-Z]:\\\p*" contained "Parameters -syn match CfgParams ".*="me=e-1 contains=CfgComment +syn match CfgParams ".\{0}="me=e-1 contains=CfgComment "... and their values (don't want to highlight '=' sign) syn match CfgValues "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff diff --git a/runtime/syntax/group.vim b/runtime/syntax/group.vim index ae5bfd855..ab2d56d6a 100644 --- a/runtime/syntax/group.vim +++ b/runtime/syntax/group.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: group(5) user group file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Latest Revision: 2012-08-05 if exists("b:current_syntax") finish @@ -12,7 +12,7 @@ set cpo&vim syn match groupBegin display '^' nextgroup=groupName -syn match groupName contained display '[a-z_][a-z0-9_-]\{0,15}' +syn match groupName contained display '[^:]\+' \ nextgroup=groupPasswordColon syn match groupPasswordColon contained display ':' @@ -30,7 +30,7 @@ syn match groupGID contained display '\d*' syn match groupUserListColon contained display ':' nextgroup=groupUserList -syn match groupUserList contained '[a-z_][a-z0-9_-]*' +syn match groupUserList contained '[^,]\+' \ nextgroup=groupUserListSep syn match groupUserListSep contained display ',' nextgroup=groupUserList diff --git a/runtime/syntax/hgcommit.vim b/runtime/syntax/hgcommit.vim new file mode 100644 index 000000000..e4c8b6ed4 --- /dev/null +++ b/runtime/syntax/hgcommit.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: hg (Mercurial) commit file +" Maintainer: Ken Takata <kentkt at csc dot jp> +" Last Change: 2012 Aug 2 +" Filenames: hg-editor-*.txt +" License: VIM License +" URL: https://github.com/k-takata/hg-vim + +if exists("b:current_syntax") + finish +endif + +syn match hgcommitComment "^HG:.*$" +syn match hgcommitUser "^HG: user: \zs.*$" contained containedin=hgcommitComment +syn match hgcommitBranch "^HG: branch \zs.*$" contained containedin=hgcommitComment +syn match hgcommitAdded "^HG: \zsadded .*$" contained containedin=hgcommitComment +syn match hgcommitChanged "^HG: \zschanged .*$" contained containedin=hgcommitComment +syn match hgcommitRemoved "^HG: \zsremoved .*$" contained containedin=hgcommitComment + +hi def link hgcommitComment Comment +hi def link hgcommitUser String +hi def link hgcommitBranch String +hi def link hgcommitAdded Identifier +hi def link hgcommitChanged Special +hi def link hgcommitRemoved Constant + +let b:current_syntax = "hgcommit" diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim index 2952ad962..3ff80b1eb 100644 --- a/runtime/syntax/lua.vim +++ b/runtime/syntax/lua.vim @@ -2,7 +2,7 @@ " Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 " Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com> " First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br> -" Last Change: 2012 Feb 07 +" Last Change: 2012 Aug 12 " Options: lua_version = 4 or 5 " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " default 5.2 @@ -48,39 +48,41 @@ syn match luaComment "\%^#!.*" " catch errors caused by wrong parenthesis and wrong curly brackets or " keywords placed outside their respective blocks +syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement +syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement -syn region luaParen transparent start='(' end=')' contains=TOP,luaParenError syn match luaParenError ")" -syn match luaError "}" +syn match luaBraceError "}" syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>" -" Function declaration -syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=TOP +" function ... end +syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn -" else -syn keyword luaCondElse matchgroup=luaCond contained containedin=luaCondEnd else +" if ... then +syn region luaIfThen transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty " then ... end -syn region luaCondEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=TOP +syn region luaThenEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn " elseif ... then -syn region luaCondElseif contained containedin=luaCondEnd transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=TOP +syn region luaElseifThen contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn -" if ... then -syn region luaCondStart transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=TOP nextgroup=luaCondEnd skipwhite skipempty +" else +syn keyword luaElse contained else " do ... end -syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=TOP +syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn + " repeat ... until -syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=TOP +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn " while ... do -syn region luaWhile transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=TOP nextgroup=luaBlock skipwhite skipempty +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty " for ... do and for ... in ... do -syn region luaFor transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=TOP nextgroup=luaBlock skipwhite skipempty +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty -syn keyword luaFor contained containedin=luaFor in +syn keyword luaIn contained in " other keywords syn keyword luaStatement return local break @@ -131,9 +133,6 @@ if lua_version >= 5 endif endif -" tables -syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=TOP,luaStatement - syn keyword luaFunc assert collectgarbage dofile error next syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION @@ -343,15 +342,17 @@ if version >= 508 || !exists("did_lua_syntax_inits") HiLink luaString2 String HiLink luaNumber Number HiLink luaOperator Operator + HiLink luaIn Operator HiLink luaConstant Constant HiLink luaCond Conditional - HiLink luaCondElse Conditional + HiLink luaElse Conditional HiLink luaFunction Function HiLink luaComment Comment HiLink luaTodo Todo HiLink luaTable Structure HiLink luaError Error HiLink luaParenError Error + HiLink luaBraceError Error HiLink luaSpecial SpecialChar HiLink luaFunc Identifier HiLink luaLabel Label diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim index acb56163b..b3f37d405 100644 --- a/runtime/syntax/rst.vim +++ b/runtime/syntax/rst.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: reStructuredText documentation format " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2010-01-23 +" Latest Revision: 2012-08-05 if exists("b:current_syntax") finish @@ -141,8 +141,8 @@ syn sync minlines=50 linebreaks=1 hi def link rstTodo Todo hi def link rstComment Comment -hi def link rstSections Type -hi def link rstTransition Type +hi def link rstSections Title +hi def link rstTransition rstSections hi def link rstLiteralBlock String hi def link rstQuotedLiteralBlock String hi def link rstDoctestBlock PreProc |