From 975a610233e05772d9c835caeede4b7ae2e1af7d Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sun, 8 Nov 2015 03:35:37 +0100 Subject: vim-patch:f2571c6 Update runtime files. References #3625. --- runtime/syntax/cpp.vim | 2 +- runtime/syntax/debchangelog.vim | 15 ++-- runtime/syntax/debcontrol.vim | 4 +- runtime/syntax/debsources.vim | 34 ++++++-- runtime/syntax/groovy.vim | 2 +- runtime/syntax/kconfig.vim | 7 +- runtime/syntax/po.vim | 8 +- runtime/syntax/rc.vim | 9 +- runtime/syntax/vhdl.vim | 49 +++++++---- runtime/syntax/zsh.vim | 189 ++++++++++++++++++++++++++++++++++++---- 10 files changed, 261 insertions(+), 58 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 04fc73342c..15f0cbb4ff 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -63,7 +63,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits") HiLink cppStructure Structure HiLink cppBoolean Boolean HiLink cppConstant Constant - HiLink cppRawDelimiter Delimiter + HiLink cppRawStringDelimiter Delimiter HiLink cppRawString String delcommand HiLink endif diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 6206fa388c..ed3d024499 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2014 Jul 11 +" Last Change: 2015 Apr 30 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim " Standard syntax initialization @@ -16,10 +16,14 @@ endif " Case doesn't matter for us syn case ignore +let urgency='urgency=\(low\|medium\|high\|critical\)\( [^[:space:],][^,]*\)\=' +let binNMU='binary-only=yes' + " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " -syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" -syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"' +exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"' +syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" @@ -27,7 +31,7 @@ syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" syn match debchangelogEmail contained "<.\{-}>" " Define the entries that make up the changelog -syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline +syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogVersion,debchangelogBinNMU oneline syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline @@ -45,7 +49,8 @@ if version >= 508 || !exists("did_debchangelog_syn_inits") HiLink debchangelogEntry Normal HiLink debchangelogCloses Statement HiLink debchangelogLP Statement - HiLink debchangelogUrgency Identifier + HiLink debchangelogFirstKV Identifier + HiLink debchangelogOtherKV Identifier HiLink debchangelogName Comment HiLink debchangelogVersion Identifier HiLink debchangelogTarget Identifier diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index 5d9d45d025..6d140d9bd9 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2014 May 01 +" Last Change: 2014 Oct 08 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim " Standard syntax initialization @@ -50,7 +50,7 @@ syn match debcontrolDmUpload contained "\cyes" syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$" -syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$" +syn match debcontrolVcsGit contained "\v%(git|https?)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$" " An email address syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index e877b06ae4..c8d110c77b 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,7 +2,7 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann -" Last Change: 2014 Jul 11 +" Last Change: 2015 May 25 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim " Standard syntax initialization @@ -21,15 +21,35 @@ syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|res " Match comments syn match debsourcesComment /#.*/ contains=@Spell +let s:cpo = &cpo +set cpo-=C +let s:supported = [ + \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', + \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', + \ + \ 'precise', 'trusty', 'utopic', 'vivid', 'wily', 'devel' + \ ] +let s:unsupported = [ + \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', + \ 'woody', 'sarge', 'etch', 'lenny', + \ + \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', + \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', + \ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy' + \ ] +let &cpo=s:cpo + " Match uri's syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ -syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+ +exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+' +exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+' " Associate our matches and regions with pretty colours -hi def link debsourcesLine Error -hi def link debsourcesKeyword Statement -hi def link debsourcesDistrKeyword Type -hi def link debsourcesComment Comment -hi def link debsourcesUri Constant +hi def link debsourcesLine Error +hi def link debsourcesKeyword Statement +hi def link debsourcesDistrKeyword Type +hi def link debsourcesUnsupportedDistrKeyword WarningMsg +hi def link debsourcesComment Comment +hi def link debsourcesUri Constant let b:current_syntax = "debsources" diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index 2056bd16d0..c745960bd5 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -157,7 +157,7 @@ syn match groovyOperator "\.\." syn match groovyOperator "<\{2,3}" syn match groovyOperator ">\{2,3}" syn match groovyOperator "->" -syn match groovyExternal '^#!.*[/\\]groovy\>' +syn match groovyLineComment '^\%1l#!.*' " Shebang line syn match groovyExceptions "\\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" " Groovy JDK stuff diff --git a/runtime/syntax/kconfig.vim b/runtime/syntax/kconfig.vim index a6ceb1712a..c7a305b73c 100644 --- a/runtime/syntax/kconfig.vim +++ b/runtime/syntax/kconfig.vim @@ -1,6 +1,9 @@ " Vim syntax file -" Maintainer: Nikolai Weibull -" Latest Revision: 2009-05-25 +" Maintainer: Christian Brabandt +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2015-05-29 +" License: Vim (see :h license) +" Repository: https://github.com/chrisbra/vim-kconfig if exists("b:current_syntax") finish diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index c09b960357..2ab13ac0b1 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: po (gettext) " Maintainer: Dwayne Bailey -" Last Change: 2012 Apr 30 +" Last Change: 2015 Jun 07 " Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Leonardo Fontenelle (Spell checking) " Nam SungHyun (Original maintainer) @@ -52,6 +52,9 @@ syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset syn match poCommentAutomatic "^#\..*$" syn match poCommentSources "^#:.*$" syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy +syn match poDiffOld '\(^#| "[^{]*+}\|{+[^}]*+}\|{+[^}]*\|"$\)' contained +syn match poDiffNew '\(^#| "[^{]*-}\|{-[^}]*-}\|{-[^}]*\|"$\)' contained +syn match poCommentDiff "^#|.*$" contains=poDiffOld,poDiffNew " Translations (also includes header fields as they appear in a translation msgstr) syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained @@ -94,8 +97,11 @@ if version >= 508 || !exists("did_po_syn_inits") HiLink poCommentAutomatic Comment HiLink poCommentTranslator Comment HiLink poCommentFlags Special + HiLink poCommentDiff Comment HiLink poCopyrightUnset Todo HiLink poFlagFuzzy Todo + HiLink poDiffOld Todo + HiLink poDiffNew Special HiLink poObsolete Comment HiLink poStatementMsgid Statement diff --git a/runtime/syntax/rc.vim b/runtime/syntax/rc.vim index c3feb97816..a2d5824d3e 100644 --- a/runtime/syntax/rc.vim +++ b/runtime/syntax/rc.vim @@ -1,7 +1,10 @@ " Vim syntax file " Language: M$ Resource files (*.rc) -" Maintainer: Heiko Erhardt -" Last Change: 2001 May 09 +" Maintainer: Christian Brabandt +" Last Change: 2015-05-29 +" Repository: https://github.com/chrisbra/vim-rc-syntax +" License: Vim (see :h license) +" Previous Maintainer: Heiko Erhardt " This file is based on the c.vim @@ -21,7 +24,7 @@ syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO syn keyword rcSubObject POPUP MENUITEM SEPARATOR -syn keyword rcSubObject CONTROL LTEXT CTEXT EDITTEXT +syn keyword rcSubObject CONTROL LTEXT CTEXT RTEXT EDITTEXT syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS syn keyword rcSubObject FILETYPE FILESUBTYPE diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index db51fa5034..c76b046d8c 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -3,7 +3,7 @@ " Maintainer: Daniel Kho " Previous Maintainer: Czo " Credits: Stephan Hegel -" Last Changed: 2012 Feb 03 by Thilo Six +" Last Changed: 2015 Apr 25 by Daniel Kho " $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $ " VHSIC (Very High Speed Integrated Circuit) Hardware Description Language @@ -160,10 +160,20 @@ syn match vhdlSpecial "[().,;]" syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" -syn keyword vhdlTodo contained TODO FIXME - -syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,@Spell -syn match vhdlComment "--.*" contains=vhdlTodo,@Spell +syn keyword vhdlTodo contained TODO NOTE +syn keyword vhdlFixme contained FIXME + +" Regex for space is '\s' +" Any number of spaces: \s* +" At least one space: \s+ +syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell +syn match vhdlComment "--.*" contains=vhdlTodo,vhdlFixme,@Spell +syn match vhdlPreProc "/\* synthesis .* \*/" +syn match vhdlPreProc "/\* pragma .* \*/" +syn match vhdlPreProc "/\* synopsys .* \*/" +syn match vhdlPreProc "--\s*synthesis .*" +syn match vhdlPreProc "--\s*pragma .*" +syn match vhdlPreProc "--\s*synopsys .*" " syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]" "Modify the following as needed. The trade-off is performance versus functionality. @@ -180,21 +190,22 @@ if version >= 508 || !exists("did_vhdl_syntax_inits") command -nargs=+ HiLink hi def link endif -" HiLink cDefine PreProc - HiLink vhdlSpecial Special - HiLink vhdlStatement Statement - HiLink vhdlCharacter Character - HiLink vhdlString String - HiLink vhdlVector Number - HiLink vhdlBoolean Number - HiLink vhdlTodo Todo - HiLink vhdlComment Comment - HiLink vhdlNumber Number - HiLink vhdlTime Number - HiLink vhdlType Type - HiLink vhdlOperator Special + HiLink vhdlSpecial Special + HiLink vhdlStatement Statement + HiLink vhdlCharacter Character + HiLink vhdlString String + HiLink vhdlVector Number + HiLink vhdlBoolean Number + HiLink vhdlTodo Todo + HiLink vhdlFixme Fixme + HiLink vhdlComment Comment + HiLink vhdlNumber Number + HiLink vhdlTime Number + HiLink vhdlType Type + HiLink vhdlOperator Operator " HiLink vhdlGlobal Error - HiLink vhdlAttribute Type + HiLink vhdlAttribute Special + HiLink vhdlPreProc PreProc delcommand HiLink endif diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim index 79fd017ee8..5e588e7d6c 100644 --- a/runtime/syntax/zsh.vim +++ b/runtime/syntax/zsh.vim @@ -1,7 +1,10 @@ " Vim syntax file -" Language: Zsh shell script -" Maintainer: Nikolai Weibull -" Latest Revision: 2010-01-23 +" Language: Zsh shell script +" Maintainer: Christian Brabandt +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2015-05-29 +" License: Vim (see :h license) +" Repository: https://github.com/chrisbra/vim-zsh if exists("b:current_syntax") finish @@ -14,7 +17,7 @@ setlocal iskeyword+=- syn keyword zshTodo contained TODO FIXME XXX NOTE -syn region zshComment oneline start='\%(^\|\s\)#' end='$' +syn region zshComment oneline start='\%(^\|\s*\)#' end='$' \ contains=zshTodo,@Spell syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$' @@ -30,7 +33,7 @@ syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' syn keyword zshPrecommand noglob nocorrect exec command builtin - time -syn keyword zshDelimiter do done +syn keyword zshDelimiter do done end syn keyword zshConditional if then elif else fi case in esac select @@ -64,7 +67,7 @@ syn region zshHereDoc matchgroup=zshRedir \ end='^\s*\z1\>' \ contains=@zshSubst syn region zshHereDoc matchgroup=zshRedir - \ start=+<\@' syn region zshHereDoc matchgroup=zshRedir \ start=+<\@' @@ -170,16 +332,8 @@ hi def link zshKeyword Keyword hi def link zshFunction None hi def link zshKSHFunction zshFunction hi def link zshHereDoc String -if 0 - hi def link zshOperator Operator -else - hi def link zshOperator None -endif -if 1 - hi def link zshRedir Operator -else - hi def link zshRedir None -endif +hi def link zshOperator None +hi def link zshRedir Operator hi def link zshVariable None hi def link zshVariableDef zshVariable hi def link zshDereferencing PreProc @@ -199,6 +353,7 @@ else hi def link zshDeref None endif hi def link zshCommands Keyword +hi def link zshOptions Constant hi def link zshTypes Type hi def link zshSwitches Special hi def link zshNumber Number -- cgit