From 3c45e3b42a6c8c48d4f2bc7d51ccfa0f6781d849 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Sun, 1 May 2016 22:19:40 +0200 Subject: vim-patch:a0f849e Update runtime files. https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2 Missing files runtime/doc/tags and runtime/doc/todo.txt. Excluded runtime/syntax/vim.vim, since we diverged quite a bit from vim in this file. --- runtime/syntax/autohotkey.vim | 6 +- runtime/syntax/netrw.vim | 1 - runtime/syntax/tex.vim | 141 ++++++++++++++++++------------------------ runtime/syntax/vhdl.vim | 1 - 4 files changed, 64 insertions(+), 85 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/autohotkey.vim b/runtime/syntax/autohotkey.vim index 42d4cfdfe4..764f94b11a 100644 --- a/runtime/syntax/autohotkey.vim +++ b/runtime/syntax/autohotkey.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: AutoHotkey script file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-06-22 +" Maintainer: SungHyun Nam +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2015-10-29 if exists("b:current_syntax") finish @@ -179,6 +180,7 @@ syn keyword autohotkeyRepeat syn keyword autohotkeyConditional \ IfExist IfNotExist If IfEqual IfLess IfGreater Else + \ IfWinExist IfWinNotExist syn match autohotkeyPreProcStart \ nextgroup= diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim index 980fe5dde5..718cee1429 100644 --- a/runtime/syntax/netrw.vim +++ b/runtime/syntax/netrw.vim @@ -19,7 +19,6 @@ syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe syn match netrwPlain "\(\S\+ \)*\S\+" contains=netrwLink,@NoSpell syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell -"syn match netrwDir "\%(\S\+ \)*\S\+/" contains=netrwClassify,@NoSpell syn match netrwDir "\%(\S\+ \)*\S\+/\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" skipwhite contains=netrwDateSep,@NoSpell nextgroup=netrwTime syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index b95ff4d8cb..90848094d7 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Jun 11, 2015 -" Version: 87 +" Last Change: Oct 19, 2015 +" Version: 89 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -122,6 +122,11 @@ endif if g:tex_fold_enabled && &fdm == "manual" setl fdm=syntax endif +if g:tex_fold_enabled && has("folding") + com! -nargs=* TexFold fold +else + com! -nargs=* TexFold +endif " (La)TeX keywords: uses the characters 0-9,a-z,A-Z,192-255 only... {{{1 " but _ is the only one that causes problems. @@ -142,7 +147,7 @@ endif " Clusters: {{{1 " -------- syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle -if !exists("s:tex_no_error") || !s:tex_no_error +if !s:tex_no_error syn cluster texCmdGroup add=texMathError endif syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement @@ -156,15 +161,16 @@ else syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher endif -syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ +syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter if !exists("g:tex_no_math") +syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ syn cluster texMatchGroup add=@texMathZones syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle - if !exists("s:tex_no_error") || !s:tex_no_error + if !s:tex_no_error syn cluster texMathMatchGroup add=texMathError syn cluster texMathZoneGroup add=texMathError endif @@ -186,7 +192,7 @@ endif " Try to flag {} and () mismatches: {{{1 if s:tex_fast =~ 'm' - if !exists("s:tex_no_error") || !s:tex_no_error + if !s:tex_no_error syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError,@NoSpell else @@ -199,15 +205,15 @@ if s:tex_fast =~ 'm' syn region texParen start="(" end=")" contains=@texMatchGroup endif endif -if !exists("s:tex_no_error") || !s:tex_no_error +if !s:tex_no_error syn match texError "[}\])]" endif if s:tex_fast =~ 'M' if !exists("g:tex_no_math") - if !exists("s:tex_no_error") || !s:tex_no_error + if !s:tex_no_error syn match texMathError "}" contained endif - syn region texMathMatcher matchgroup=Delimiter start="{" skip="\(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup endif endif @@ -218,7 +224,7 @@ if exists("g:tex_tex") || b:tex_stylish syn match texStatement "\\[a-zA-Z@]\+" else syn match texStatement "\\\a\+" - if !exists("s:tex_no_error") || !s:tex_no_error + if !s:tex_no_error syn match texError "\\\a*@[a-zA-Z@]*" endif endif @@ -226,7 +232,7 @@ endif " TeX/LaTeX delimiters: {{{1 syn match texDelimiter "&" syn match texDelimiter "\\\\" -"%syn match texDelimiter "[{}]" +" syn match texDelimiter "[{}]" " Tex/Latex Options: {{{1 syn match texOption "[^\\]\zs#\d\+\|^#\d\+" @@ -247,7 +253,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" " \begin{}/\end{} section markers: {{{1 syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName if s:tex_fast =~ 'm' - syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment + syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell endif @@ -337,54 +343,27 @@ syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 if s:tex_fast =~ 'p' if !exists("g:tex_nospell") || !g:tex_nospell - if g:tex_fold_enabled && has("folding") - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell - else - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell - syn region texSpellZone matchgroup=texSpellZone start="%spellzone_start" end="%spellzone_end" contains=@Spell - endif + TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell + TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell + TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell + TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell + TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell + TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell + TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell + TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell + TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell else - if g:tex_fold_enabled && has("folding") - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup - else - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup - syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup - syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup - syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup - endif + TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup + TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup + TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup + TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup + TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup + TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup + TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup + TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup + TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup + TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup endif endif @@ -406,8 +385,8 @@ if s:tex_fast =~ 'b' endif " Bad Math (mismatched): {{{1 -if !exists("g:tex_no_math") && (!exists("s:tex_no_error") || !s:tex_no_error) - syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}" +if !exists("g:tex_no_math") && !s:tex_no_error + syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" syn match texBadMath "\\[\])]" endif @@ -456,8 +435,9 @@ if !exists("g:tex_no_math") call TexNewMathZone("G","gather",1) call TexNewMathZone("H","math",1) call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","xalignat",1) - call TexNewMathZone("K","xxalignat",0) + call TexNewMathZone("J","subequations",0) + call TexNewMathZone("K","xalignat",1) + call TexNewMathZone("L","xxalignat",0) " Inline Math Zones: {{{2 if s:tex_fast =~ 'M' @@ -573,25 +553,23 @@ syn case ignore syn keyword texTodo contained combak fixme todo xxx syn case match if s:extfname == "dtx" - syn match texComment "\^\^A.*$" contains=@texCommentGroup - syn match texComment "^%\+" contains=@texCommentGroup + syn match texComment "\^\^A.*$" contains=@texCommentGroup + syn match texComment "^%\+" contains=@texCommentGroup else - if g:tex_fold_enabled - " allows syntax-folding of 2 or more contiguous comment lines - " single-line comments are not folded - syn match texComment "%.*$" contains=@texCommentGroup - if s:tex_fast =~ 'c' - syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold - syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" fold contains=@texFoldGroup,@NoSpell - syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" fold contains=@Spell,@texFoldGroup - endif - else - syn match texComment "%.*$" contains=@texCommentGroup - if s:tex_fast =~ 'c' - syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell - syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" contains=@Spell,@texFoldGroup - endif + if g:tex_fold_enabled + " allows syntax-folding of 2 or more contiguous comment lines + " single-line comments are not folded + syn match texComment "%.*$" contains=@texCommentGroup + if s:tex_fast =~ 'c' + TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' + TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell endif + else + syn match texComment "%.*$" contains=@texCommentGroup + if s:tex_fast =~ 'c' + syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif + endif endif " Separate lines used for verb` and verb# so that the end conditions {{{1 @@ -673,7 +651,7 @@ syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\ syn match texString "\(``\|''\|,,\)" " makeatletter -- makeatother sections -if !exists("s:tex_no_error") || !s:tex_no_error +if !s:tex_no_error if s:tex_fast =~ 'S' syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained endif @@ -1353,6 +1331,7 @@ if did_tex_syntax_inits == 1 endif " Cleanup: {{{1 +delc TexFold unlet s:extfname let b:current_syntax = "tex" let &cpo = s:keepcpo diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index da2b975ddc..eeba10a41c 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -4,7 +4,6 @@ " Previous Maintainer: Czo " Credits: Stephan Hegel " Last Changed: 2015 Oct 13 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 -- cgit From c535cc7dde493f405d81cfb9d331405d9b0f097a Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Tue, 3 May 2016 20:58:32 +0200 Subject: vim-patch:d7464be Updated runtime files. https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2 Applied cleanly except for runtime/docs/todo.txt and runtime/docs/tags. --- runtime/syntax/hog.vim | 536 ++++++++++++++++++------------------------------- 1 file changed, 193 insertions(+), 343 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/hog.vim b/runtime/syntax/hog.vim index 7f01d7fc11..f37f7ae899 100644 --- a/runtime/syntax/hog.vim +++ b/runtime/syntax/hog.vim @@ -1,350 +1,200 @@ -" Snort syntax file -" Language: Snort Configuration File (see: http://www.snort.org) -" Maintainer: Phil Wood, cornett@arpa.net -" Last Change: $Date: 2004/06/13 17:41:17 $ -" Filenames: *.hog *.rules snort.conf vision.conf -" URL: http://home.lanl.gov/cpw/vim/syntax/hog.vim -" Snort Version: 1.8 By Martin Roesch (roesch@clark.net, www.snort.org) -" TODO include all 1.8 syntax - -" For version 5.x: Clear all syntax items +" Vim syntax file +" Language: hog (Snort.conf + .rules) +" Maintainer: Victor Roemer, . +" Last Change: 2015 Oct 24 -> Rename syntax items from Snort -> Hog +" 2012 Oct 24 -> Originalish release + if version < 600 - syntax clear + syntax clear elseif exists("b:current_syntax") -" For version 6.x: Quit when a syntax file was already loaded - finish + finish endif -syn match hogComment +\s\#[^\-:.%#=*].*$+lc=1 contains=hogTodo,hogCommentString -syn region hogCommentString contained oneline start='\S\s\+\#+'ms=s+1 end='\#' - -syn match hogJunk "\<\a\+|\s\+$" -syn match hogNumber contained "\<\d\+\>" -syn region hogText contained oneline start='\S' end=',' skipwhite -syn region hogTexts contained oneline start='\S' end=';' skipwhite - -" Environment Variables -" ===================== -"syn match hogEnvvar contained "[\!]\=\$\I\i*" -"syn match hogEnvvar contained "[\!]\=\${\I\i*}" -syn match hogEnvvar contained "\$\I\i*" -syn match hogEnvvar contained "[\!]\=\${\I\i*}" - - -" String handling lifted from vim.vim written by Dr. Charles E. Campbell, Jr. -" Try to catch strings, if nothing else matches (therefore it must precede the others!) -" vmEscapeBrace handles ["] []"] (ie. stays as string) -syn region hogEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1 -syn match hogPatSep contained "\\[|()]" -syn match hogNotPatSep contained "\\\\" -syn region hogString oneline start=+[^:a-zA-Z\->!\\]"+hs=e+1 skip=+\\\\\|\\"+ end=+"\s*;+he=s-1 contains=hogEscapeBrace,hogPatSep,hogNotPatSep oneline -""syn region hogString oneline start=+[^:a-zA-Z>!\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+ contains=hogEscapeBrace,vimPatSep,hogNotPatSep -"syn region hogString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=hogEscapeBrace,hogPatSep,hogNotPatSep -"syn region hogString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=hogEscapeBrace,hogPatSep,hogNotPatSep -"syn region hogString oneline start="[^\\]+\s*[^a-zA-Z0-9.]"lc=1 skip="\\\\\|\\+" end="+" contains=hogEscapeBrace,hogPatSep,hogNotPatSep -"syn region hogString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=hogEscapeBrace,hogPatSep,hogNotPatSep -"syn match hogString contained +"[^"]*\\$+ skipnl nextgroup=hogStringCont -"syn match hogStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ - - -" Beginners - Patterns that involve ^ -" -syn match hogLineComment +^[ \t]*#.*$+ contains=hogTodo,hogCommentString,hogCommentTitle -syn match hogCommentTitle '#\s*\u\a*\(\s\+\u\a*\)*:'ms=s+1 contained -syn keyword hogTodo contained TODO - -" Rule keywords -syn match hogARPCOpt contained "\d\+,\*,\*" -syn match hogARPCOpt contained "\d\+,\d\+,\*" -syn match hogARPCOpt contained "\d\+,\*,\d\+" -syn match hogARPCOpt contained "\d\+,\d\+,\d" -syn match hogATAGOpt contained "session" -syn match hogATAGOpt contained "host" -syn match hogATAGOpt contained "dst" -syn match hogATAGOpt contained "src" -syn match hogATAGOpt contained "seconds" -syn match hogATAGOpt contained "packets" -syn match hogATAGOpt contained "bytes" -syn keyword hogARespOpt contained rst_snd rst_rcv rst_all skipwhite -syn keyword hogARespOpt contained icmp_net icmp_host icmp_port icmp_all skipwhite -syn keyword hogAReactOpt contained block warn msg skipwhite -syn match hogAReactOpt contained "proxy\d\+" skipwhite -syn keyword hogAFOpt contained logto content_list skipwhite -syn keyword hogAIPOptVal contained eol nop ts sec lsrr lsrre satid ssrr rr skipwhite -syn keyword hogARefGrps contained arachnids skipwhite -syn keyword hogARefGrps contained bugtraq skipwhite -syn keyword hogARefGrps contained cve skipwhite -syn keyword hogSessionVal contained printable all skipwhite -syn match hogAFlagOpt contained "[0FSRPAUfsrpau21]\+" skipwhite -syn match hogAFragOpt contained "[DRMdrm]\+" skipwhite -" -" Output syslog options -" Facilities -syn keyword hogSysFac contained LOG_AUTH LOG_AUTHPRIV LOG_DAEMON LOG_LOCAL0 -syn keyword hogSysFac contained LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 -syn keyword hogSysFac contained LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_USER -" Priorities -syn keyword hogSysPri contained LOG_EMERG ALERT LOG_CRIT LOG_ERR -syn keyword hogSysPri contained LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG -" Options -syn keyword hogSysOpt contained LOG_CONS LOG_NDELAY LOG_PERROR -syn keyword hogSysOpt contained LOG_PID -" RuleTypes -syn keyword hogRuleType contained log pass alert activate dynamic - -" Output log_database arguments and parameters -" Type of database followed by , -" syn keyword hogDBSQL contained mysql postgresql unixodbc -" Parameters param=constant -" are just various constants assigned to parameter names - -" Output log_database arguments and parameters -" Type of database followed by , -syn keyword hogDBType contained alert log -syn keyword hogDBSRV contained mysql postgresql unixodbc -" Parameters param=constant -" are just various constants assigned to parameter names -syn keyword hogDBParam contained dbname host port user password sensor_name - -" Output xml arguments and parameters -" xml args -syn keyword hogXMLArg contained log alert -syn keyword hogXMLParam contained file protocol host port cert key ca server sanitize encoding detail -" -" hog rule handler '(.*)' -syn region hogAOpt contained oneline start="rpc" end=":"me=e-1 nextgroup=hogARPCOptGrp skipwhite -syn region hogARPCOptGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogARPCOpt skipwhite - -syn region hogAOpt contained oneline start="tag" end=":"me=e-1 nextgroup=hogATAGOptGrp skipwhite -syn region hogATAGOptGrp contained oneline start="."hs=s+1 skip="," end=";"me=e-1 contains=hogATAGOpt,hogNumber skipwhite -" -syn region hogAOpt contained oneline start="nocase\|sameip" end=";"me=e-1 skipwhite oneline keepend -" -syn region hogAOpt contained start="resp" end=":"me=e-1 nextgroup=hogARespOpts skipwhite -syn region hogARespOpts contained oneline start="." end="[,;]" contains=hogARespOpt skipwhite nextgroup=hogARespOpts -" -syn region hogAOpt contained start="react" end=":"me=e-1 nextgroup=hogAReactOpts skipwhite -syn region hogAReactOpts contained oneline start="." end="[,;]" contains=hogAReactOpt skipwhite nextgroup=hogAReactOpts - -syn region hogAOpt contained oneline start="depth\|seq\|ttl\|ack\|icmp_seq\|activates\|activated_by\|dsize\|icode\|icmp_id\|count\|itype\|tos\|id\|offset" end=":"me=e-1 nextgroup=hogANOptGrp skipwhite -syn region hogANOptGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogNumber skipwhite oneline keepend - -syn region hogAOpt contained oneline start="classtype" end=":"me=e-1 nextgroup=hogAFileGrp skipwhite - -syn region hogAOpt contained oneline start="regex\|msg\|content" end=":"me=e-1 nextgroup=hogAStrGrp skipwhite -"syn region hogAStrGrp contained oneline start=+:\s*"+hs=s+1 skip="\\;" end=+"\s*;+he=s-1 contains=hogString skipwhite oneline keepend -syn region hogAStrGrp contained oneline start=+:\s*"\|:"+hs=s+1 skip="\\;" end=+"\s*;+he=s-1 contains=hogString skipwhite oneline keepend - -syn region hogAOpt contained oneline start="logto\|content-list" end=":"me=e-1 nextgroup=hogAFileGrp skipwhite -syn region hogAFileGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogFileName skipwhite - -syn region hogAOpt contained oneline start="reference" end=":"me=e-1 nextgroup=hogARefGrp skipwhite -syn region hogARefGrp contained oneline start="."hs=s+1 end=","me=e-1 contains=hogARefGrps nextgroup=hogARefName skipwhite -syn region hogARefName contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogString,hogFileName,hogNumber skipwhite - -syn region hogAOpt contained oneline start="flags" end=":"he=s-1 nextgroup=hogAFlagOpt skipwhite oneline keepend - -syn region hogAOpt contained oneline start="fragbits" end=":"he=s-1 nextgroup=hogAFlagOpt skipwhite oneline keepend - -syn region hogAOpt contained oneline start="ipopts" end=":"he=s-1 nextgroup=hogAIPOptVal skipwhite oneline keepend - -"syn region hogAOpt contained oneline start="." end=":"he=s-1 contains=hogAFOpt nextgroup=hogFileName skipwhite - -syn region hogAOpt contained oneline start="session" end=":"he=s-1 nextgroup=hogSessionVal skipwhite - -syn match nothing "$" -syn region hogRules oneline contains=nothing start='$' end="$" -syn region hogRules oneline contains=hogRule start='('ms=s+1 end=")\s*$" skipwhite -syn region hogRule contained oneline start="." skip="\\;" end=";"he=s-1 contains=hogAOpts, skipwhite keepend -"syn region hogAOpts contained oneline start="." end="[;]"he=s-1 contains=hogAOpt skipwhite -syn region hogAOpts contained oneline start="." end="[;]"me=e-1 contains=hogAOpt skipwhite - - -" ruletype command -syn keyword hogRTypeStart skipwhite ruletype nextgroup=hogRuleName skipwhite -syn region hogRuleName contained start="." end="\s" contains=hogFileName nextgroup=hogRTypeRegion -" type ruletype sub type -syn region hogRtypeRegion contained start="{" end="}" nextgroup=hogRTypeStart -syn keyword hogRTypeStart skipwhite type nextgroup=hogRuleTypes skipwhite -syn region hogRuleTypes contained start="." end="\s" contains=hogRuleType nextgroup=hogOutStart - - -" var command -syn keyword hogVarStart skipwhite var nextgroup=hogVarIdent skipwhite -syn region hogVarIdent contained start="."hs=e+1 end="\s\+"he=s-1 contains=hogEnvvar nextgroup=hogVarRegion skipwhite -syn region hogVarRegion contained oneline start="." contains=hogIPaddr,hogEnvvar,hogNumber,hogString,hogFileName end="$"he=s-1 keepend skipwhite - -" config command -syn keyword hogConfigStart config skipwhite nextgroup=hogConfigType -syn match hogConfigType contained "\" nextgroup=hogConfigTypeRegion skipwhite -syn region hogConfigTypeRegion contained oneline start=":"ms=s+1 end="$" contains=hogNumber,hogText keepend skipwhite - - -" include command -syn keyword hogIncStart include skipwhite nextgroup=hogIncRegion -syn region hogIncRegion contained oneline start="\>" contains=hogFileName,hogEnvvar end="$" keepend - -" preprocessor command -" http_decode, minfrag, portscan[-ignorehosts] -syn keyword hogPPrStart preprocessor skipwhite nextgroup=hogPPr -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogStreamRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogStreamRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogStreamRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn match hogPPr contained "\" nextgroup=hogPPrRegion skipwhite -syn region hogPPrRegion contained oneline start="$" end="$" keepend -syn region hogPPrRegion contained oneline start=":" end="$" contains=hogNumber,hogIPaddr,hogEnvvar,hogFileName keepend -syn keyword hogStreamArgs contained timeout ports maxbytes -syn region hogStreamRegion contained oneline start=":" end="$" contains=hogStreamArgs,hogNumber - -" output command -syn keyword hogOutStart output nextgroup=hogOut skipwhite -" -" alert_syslog -syn match hogOut contained "\" nextgroup=hogSyslogRegion skipwhite -syn region hogSyslogRegion contained start=":" end="$" contains=hogSysFac,hogSysPri,hogSysOpt,hogEnvvar oneline skipwhite keepend -" -" alert_fast (full,smb,unixsock, and tcpdump) -syn match hogOut contained "\" nextgroup=hogLogFileRegion skipwhite -syn region hogLogFileRegion contained start=":" end="$" contains=hogFileName,hogEnvvar oneline skipwhite keepend -" -" database -syn match hogOut contained "\" nextgroup=hogDBTypes skipwhite -syn region hogDBTypes contained start=":" end="," contains=hogDBType,hogEnvvar nextgroup=hogDBSRVs skipwhite -syn region hogDBSRVs contained start="\s\+" end="," contains=hogDBSRV nextgroup=hogDBParams skipwhite -syn region hogDBParams contained start="." end="="me=e-1 contains=hogDBParam nextgroup=hogDBValues -syn region hogDBValues contained start="." end="\>" contains=hogNumber,hogEnvvar,hogAscii nextgroup=hogDBParams oneline skipwhite -syn match hogAscii contained "\<\a\+" -" -" log_tcpdump -syn match hogOut contained "\" nextgroup=hogLogRegion skipwhite -syn region hogLogRegion oneline start=":" skipwhite end="$" contains=hogEnvvar,hogFileName keepend -" -" xml -syn keyword hogXMLTrans contained http https tcp iap -syn match hogOut contained "\" nextgroup=hogXMLRegion skipwhite -syn region hogXMLRegion contained start=":" end="," contains=hogXMLArg,hogEnvvar nextgroup=hogXMLParams skipwhite -"syn region hogXMLParams contained start="." end="="me=e-1 contains=hogXMLProto nextgroup=hogXMLProtos -"syn region hogXMLProtos contained start="." end="\>" contains=hogXMLTrans nextgroup=hogXMLParams -syn region hogXMLParams contained start="." end="="me=e-1 contains=hogXMLParam nextgroup=hogXMLValue -syn region hogXMLValue contained start="." end="\>" contains=hogNumber,hogIPaddr,hogEnvvar,hogAscii,hogFileName nextgroup=hogXMLParams oneline skipwhite keepend -" -" Filename -syn match hogFileName contained "[-./[:alnum:]_~]\+" -syn match hogFileName contained "[-./[:alnum:]_~]\+" -" IP address -syn match hogIPaddr "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" -syn match hogIPaddr "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,2}\>" - -syn keyword hogProto tcp TCP ICMP icmp udp UDP - -" hog alert address port pairs -" hog IPaddresses -syn match hogIPaddrAndPort contained "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" skipwhite nextgroup=hogPort -syn match hogIPaddrAndPort contained "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,2}\>" skipwhite nextgroup=hogPort -syn match hogIPaddrAndPort contained "\" skipwhite nextgroup=hogPort -syn match hogIPaddrAndPort contained "\$\I\i*" nextgroup=hogPort skipwhite -syn match hogIPaddrAndPort contained "\${\I\i*}" nextgroup=hogPort skipwhite -"syn match hogPort contained "[\!]\=[\:]\=\d\+L\=\>" skipwhite -syn match hogPort contained "[\:]\=\d\+\>" -syn match hogPort contained "[\!]\=\" skipwhite -syn match hogPort contained "[\!]\=\d\+L\=:\d\+L\=\>" skipwhite - -" action commands -syn keyword hog7Functions activate skipwhite nextgroup=hogActRegion -syn keyword hog7Functions dynamic skipwhite nextgroup=hogActRegion -syn keyword hogActStart alert skipwhite nextgroup=hogActRegion -syn keyword hogActStart log skipwhite nextgroup=hogActRegion -syn keyword hogActStart pass skipwhite nextgroup=hogActRegion - -syn region hogActRegion contained oneline start="tcp\|TCP\|udp\|UDP\|icmp\|ICMP" end="\s\+"me=s-1 nextgroup=hogActSource oneline keepend skipwhite -syn region hogActSource contained oneline contains=hogIPaddrAndPort start="\s\+"ms=e+1 end="->\|<>"me=e-2 oneline keepend skipwhite nextgroup=hogActDest -syn region hogActDest contained oneline contains=hogIPaddrAndPort start="->\|<>" end="$" oneline keepend -syn region hogActDest contained oneline contains=hogIPaddrAndPort start="->\|<>" end="("me=e-1 oneline keepend skipwhite nextgroup=hogRules - - -" ==================== -if version >= 508 || !exists("did_hog_syn_inits") - if version < 508 - let did_hog_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif -" The default methods for highlighting. Can be overridden later - HiLink hogComment Comment - HiLink hogLineComment Comment - HiLink hogAscii Constant - HiLink hogCommentString Constant - HiLink hogFileName Constant - HiLink hogIPaddr Constant - HiLink hogNotPatSep Constant - HiLink hogNumber Constant - HiLink hogText Constant - HiLink hogString Constant - HiLink hogSysFac Constant - HiLink hogSysOpt Constant - HiLink hogSysPri Constant -" HiLink hogAStrGrp Error - HiLink hogJunk Error - HiLink hogEnvvar Identifier - HiLink hogIPaddrAndPort Identifier - HiLink hogVarIdent Identifier - HiLink hogATAGOpt PreProc - HiLink hogAIPOptVal PreProc - HiLink hogARespOpt PreProc - HiLink hogAReactOpt PreProc - HiLink hogAFlagOpt PreProc - HiLink hogAFragOpt PreProc - HiLink hogCommentTitle PreProc - HiLink hogDBType PreProc - HiLink hogDBSRV PreProc - HiLink hogPort PreProc - HiLink hogARefGrps PreProc - HiLink hogSessionVal PreProc - HiLink hogXMLArg PreProc - HiLink hogARPCOpt PreProc - HiLink hogPatSep Special - HiLink hog7Functions Statement - HiLink hogActStart Statement - HiLink hogIncStart Statement - HiLink hogConfigStart Statement - HiLink hogOutStart Statement - HiLink hogPPrStart Statement - HiLink hogVarStart Statement - HiLink hogRTypeStart Statement - HiLink hogTodo Todo - HiLink hogRuleType Type - HiLink hogAFOpt Type - HiLink hogANoVal Type - HiLink hogAStrOpt Type - HiLink hogANOpt Type - HiLink hogAOpt Type - HiLink hogDBParam Type - HiLink hogStreamArgs Type - HiLink hogOut Type - HiLink hogPPr Type - HiLink hogConfigType Type - HiLink hogActRegion Type - HiLink hogProto Type - HiLink hogXMLParam Type - HiLink resp Todo - HiLink cLabel Label - delcommand HiLink +setlocal iskeyword-=: +setlocal iskeyword+=- +syn case ignore + +" Hog ruletype crap +syn keyword HogRuleType ruletype nextgroup=HogRuleTypeName skipwhite +syn match HogRuleTypeName "[[:alnum:]_]\+" contained nextgroup=HogRuleTypeBody skipwhite +syn region HogRuleTypeBody start="{" end="}" contained contains=HogRuleTypeType,HogOutput fold +syn keyword HogRuleTypeType type contained + +" Hog Configurables +syn keyword HogPreproc preprocessor nextgroup=HogConfigName skipwhite +syn keyword HogConfig config nextgroup=HogConfigName skipwhite +syn keyword HogOutput output nextgroup=HogConfigName skipwhite +syn match HogConfigName "[[:alnum:]_-]\+" contained nextgroup=HogConfigOpts skipwhite +syn region HogConfigOpts start=":" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold keepend contained contains=HogSpecial,HogNumber,HogIPAddr,HogVar,HogComment + +" Event filter's and threshold's +syn region HogEvFilter start="event_filter\|threshold" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold transparent keepend contains=HogEvFilterKeyword,HogEvFilterOptions,HogComment +syn keyword HogEvFilterKeyword skipwhite event_filter threshold +syn keyword HogEvFilterOptions skipwhite type nextgroup=HogEvFilterTypes +syn keyword HogEvFilterTypes skipwhite limit threshold both contained +syn keyword HogEvFilterOptions skipwhite track nextgroup=HogEvFilterTrack +syn keyword HogEvFilterTrack skipwhite by_src by_dst contained +syn keyword HogEvFilterOptions skipwhite gen_id sig_id count seconds nextgroup=HogNumber + +" Suppressions +syn region HogEvFilter start="suppress" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold transparent keepend contains=HogSuppressKeyword,HogComment +syn keyword HogSuppressKeyword skipwhite suppress +syn keyword HogSuppressOptions skipwhite gen_id sig_id nextgroup=HogNumber +syn keyword HogSuppressOptions skipwhite track nextgroup=HogEvFilterTrack +syn keyword HogSuppressOptions skipwhite ip nextgroup=HogIPAddr + +" Attribute table +syn keyword HogAttribute attribute_table nextgroup=HogAttributeFile +syn match HogAttributeFile contained ".*$" contains=HogVar,HogAttributeType,HogComment +syn keyword HogAttributeType filename + +" Hog includes +syn keyword HogInclude include nextgroup=HogIncludeFile skipwhite +syn match HogIncludeFile ".*$" contained contains=HogVar,HogComment + +" Hog dynamic libraries +syn keyword HogDylib dynamicpreprocessor dynamicengine dynamicdetection nextgroup=HogDylibFile skipwhite +syn match HogDylibFile "\s.*$" contained contains=HogVar,HogDylibType,HogComment +syn keyword HogDylibType directory file contained + +" Variable dereferenced with '$' +syn match HogVar "\$[[:alnum:]_]\+" + +", Variables declared with 'var' +syn keyword HogVarType var nextgroup=HogVarSet skipwhite +syn match HogVarSet "[[:alnum:]_]\+" display contained nextgroup=HogVarValue skipwhite +syn match HogVarValue ".*$" contained contains=HogString,HogNumber,HogVar,HogComment + +" Variables declared with 'ipvar' +syn keyword HogIPVarType ipvar nextgroup=HogIPVarSet skipwhite +syn match HogIPVarSet "[[:alnum:]_]\+" display contained nextgroup=HogIPVarList,HogSpecial skipwhite +syn region HogIPVarList start="\[" end="]" contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot + +" Variables declared with 'portvar' +syn keyword HogPortVarType portvar nextgroup=HogPortVarSet skipwhite +syn match HogPortVarSet "[[:alnum:]_]\+" display contained nextgroup=HogPortVarList,HogPort,HogOpRange,HogOpNot,HogSpecial skipwhite +syn region HogPortVarList start="\[" end="]" contains=HogPortVarList,HogVar,HogOpNot,HogPort,HogOpRange,HogOpNot +syn match HogPort "\<\%(\d\+\|any\)\>" display contains=HogOpRange nextgroup=HogOpRange + +" Generic stuff +syn match HogIPAddr contained "\<\%(\d\{1,3}\(\.\d\{1,3}\)\{3}\|any\)\>" nextgroup=HogIPCidr +syn match HogIPAddr contained "\<\d\{1,3}\(\.\d\{1,3}\)\{3}\>" nextgroup=HogIPCidr +syn match HogIPCidr contained "\/\([0-2][0-9]\=\|3[0-2]\=\)" +syn region HogHexEsc contained start='|' end='|' oneline +syn region HogString contained start='"' end='"' extend oneline contains=HogHexEsc +syn match HogNumber contained display "\<\d\+\>" +syn match HogNumber contained display "\<\d\+\>" +syn match HogNumber contained display "0x\x\+\>" +syn keyword HogSpecial contained true false yes no default all any +syn keyword HogSpecialAny contained any +syn match HogOpNot "!" contained +syn match HogOpRange ":" contained + +" Rules +syn keyword HogRuleAction activate alert drop block dynamic log pass reject sdrop sblock skipwhite nextgroup=HogRuleProto,HogRuleBlock +syn keyword HogRuleProto ip tcp udp icmp skipwhite contained nextgroup=HogRuleSrcIP +syn match HogRuleSrcIP "\S\+" transparent skipwhite contained contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot nextgroup=HogRuleSrcPort +syn match HogRuleSrcPort "\S\+" transparent skipwhite contained contains=HogPortVarList,HogVar,HogPort,HogOpRange,HogOpNot nextgroup=HogRuleDir +syn match HogRuleDir "->\|<>" skipwhite contained nextgroup=HogRuleDstIP +syn match HogRuleDstIP "\S\+" transparent skipwhite contained contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot nextgroup=HogRuleDstPort +syn match HogRuleDstPort "\S\+" transparent skipwhite contained contains=HogPortVarList,HogVar,HogPort,HogOpRange,HogOpNot nextgroup=HogRuleBlock +syn region HogRuleBlock start="(" end=")" transparent skipwhite contained contains=HogRuleOption,HogComment fold +",HogString,HogComment,HogVar,HogOptNot +"syn region HogRuleOption start="\" end="\ze;" skipwhite contained contains=HogNumber +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP msg gid sid rev classtype priority metadata content nocase rawbytes +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP depth offset distance within http_client_body http_cookie http_raw_cookie http_header +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP http_raw_header http_method http_uri http_raw_uri http_stat_code http_stat_msg +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP fast_pattern uricontent urilen isdataat pcre pkt_data file_data base64_decode base64_data +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP byte_test byte_jump byte_extract ftpbounce asn1 cvs dce_iface dce_opnum dce_stub_data +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP sip_method sip_stat_code sip_header sip_body gtp_type gtp_info gtp_version ssl_version +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP ssl_state fragoffset ttl tos id ipopts fragbits dsize flags flow flowbits seq ack window +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP itype icode icmp_id icmp_seq rpc ip_proto sameip stream_reassemble stream_size +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP logto session resp react tag activates activated_by count replace detection_filter +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP threshold reference sd_pattern file_type file_group + +syn region HogRuleSROP start=':' end=";" transparent keepend contained contains=HogRuleChars,HogString,HogNumber +syn match HogRuleChars "\%(\k\|\.\|?\|=\|/\|%\|&\)\+" contained +syn match HogURLChars "\%(\.\|?\|=\)\+" contained + +" Hog File Type Rules +syn match HogFileType /^\s*file.*$/ transparent contains=HogFileTypeOpt,HogFileFROP +syn keyword HogFileTypeOpt skipwhite contained nextgroup=HogRuleFROP file type ver category id rev content offset msg group +syn region HogFileFROP start=':' end=";" transparent keepend contained contains=NotASemicoln +syn match NotASemiColn ".*$" contained + + +" Comments +syn keyword HogTodo XXX TODO NOTE contained +syn match HogTodo "Step\s\+#\=\d\+" contained +syn region HogComment start="#" end="$" contains=HogTodo,@Spell + +syn case match + +if !exists("hog_minlines") + let hog_minlines = 100 endif +exec "syn sync minlines=" . hog_minlines + +hi link HogRuleType Statement +hi link HogRuleTypeName Type +hi link HogRuleTypeType Keyword + +hi link HogPreproc Statement +hi link HogConfig Statement +hi link HogOutput Statement +hi link HogConfigName Type + +"hi link HogEvFilter +hi link HogEvFilterKeyword Statement +hi link HogSuppressKeyword Statement +hi link HogEvFilterTypes Constant +hi link HogEvFilterTrack Constant + +hi link HogAttribute Statement +hi link HogAttributeFile String +hi link HogAttributeType Statement + +hi link HogInclude Statement +hi link HogIncludeFile String + +hi link HogDylib Statement +hi link HogDylibType Statement +hi link HogDylibFile String + +" Variables +" var +hi link HogVar Identifier +hi link HogVarType Keyword +hi link HogVarSet Identifier +hi link HogVarValue String +" ipvar +hi link HogIPVarType Keyword +hi link HogIPVarSet Identifier +" portvar +hi link HogPortVarType Keyword +hi link HogPortVarSet Identifier +hi link HogPort Constant + +hi link HogTodo Todo +hi link HogComment Comment +hi link HogString String +hi link HogHexEsc PreProc +hi link HogNumber Number +hi link HogSpecial Constant +hi link HogSpecialAny Constant +hi link HogIPAddr Constant +hi link HogIPCidr Constant +hi link HogOpNot Operator +hi link HogOpRange Operator + +hi link HogRuleAction Statement +hi link HogRuleProto Identifier +hi link HogRuleDir Operator +hi link HogRuleOption Keyword +hi link HogRuleChars String + +hi link HogFileType HogRuleAction +hi link HogFileTypeOpt HogRuleOption +hi link NotASemiColn HogRuleChars let b:current_syntax = "hog" - -" hog: cpw=59 -- cgit From 367b1893e7efab3c97bb7df9c07703d076a94542 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Tue, 3 May 2016 21:00:18 +0200 Subject: vim-patch:b4ff518 Updated runtime files. https://github.com/vim/vim/commit/b4ff518d95aa57c2f8c0568c915035bef849581b Missing files: runtime/doc/tags, runtime/doc/todo.txt. Changes to runtime/doc/if_pyth.txt, runtime/doc/options.txt and runtime/doc/quickref.txt did not aply. Excluded runtime/syntax/vim.vim. --- runtime/syntax/cpp.vim | 14 +++- runtime/syntax/remind.vim | 20 +++-- runtime/syntax/sh.vim | 190 +++++++++++++++++++++------------------------- runtime/syntax/tex.vim | 164 ++++++++++++++++++++------------------- 4 files changed, 196 insertions(+), 192 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 135b8c9244..c7a68388be 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan -" Last Change: 2015 May 04 +" Last Change: 2015 Nov 10 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -23,7 +23,8 @@ endif " C++ extensions syn keyword cppStatement new delete this friend using syn keyword cppAccess public protected private -syn keyword cppType inline virtual explicit export bool wchar_t +syn keyword cppModifier inline virtual explicit export +syn keyword cppType bool wchar_t syn keyword cppExceptions throw try catch syn keyword cppOperator operator typeid syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq @@ -36,7 +37,8 @@ syn keyword cppConstant __cplusplus " C++ 11 extensions if !exists("cpp_no_cpp11") - syn keyword cppType override final + syn keyword cppModifier override final + syn keyword cppType nullptr_t syn keyword cppExceptions noexcept syn keyword cppStorageClass constexpr decltype thread_local syn keyword cppConstant nullptr @@ -49,6 +51,11 @@ if !exists("cpp_no_cpp11") syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell endif +" C++ 14 extensions +if !exists("cpp_no_cpp14") + syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>" +endif + " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" @@ -65,6 +72,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits") HiLink cppExceptions Exception HiLink cppOperator Operator HiLink cppStatement Statement + HiLink cppModifier Type HiLink cppType Type HiLink cppStorageClass StorageClass HiLink cppStructure Structure diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim index 93a7178479..98064e043a 100644 --- a/runtime/syntax/remind.vim +++ b/runtime/syntax/remind.vim @@ -1,13 +1,17 @@ " Vim syntax file " Language: Remind -" Maintainer: Davide Alberani -" Last Change: 18 Sep 2009 -" Version: 0.5 -" URL: http://erlug.linux.it/~da/vim/syntax/remind.vim +" Maintainer: Davide Alberani +" Last Change: 02 Nov 2015 +" Version: 0.7 +" URL: http://ismito.it/vim/syntax/remind.vim " -" remind is a sophisticated reminder service -" you can download remind from: -" http://www.roaringpenguin.com/penguin/open_source_remind.php +" Remind is a sophisticated calendar and alarm program. +" You can download remind from: +" https://www.roaringpenguin.com/products/remind +" +" Changelog +" version 0.7: updated email and link +" version 0.6: added THROUGH keyword (courtesy of Ben Orchard) if version < 600 syntax clear @@ -19,7 +23,7 @@ endif syn case ignore syn keyword remindCommands REM OMIT SET FSET UNSET -syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED +syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED THROUGH syn keyword remindTag PRIORITY TAG syn keyword remindTimed AT DURATION syn keyword remindMove ONCE SKIP BEFORE AFTER diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 60f23d2d83..830539428b 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,11 +2,11 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz -" Last Change: Oct 09, 2015 -" Version: 139 +" Last Change: Oct 21, 2015 +" Version: 141 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax -" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr) +" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) " For version 5.x: Clear all syntax items {{{1 " For version 6.x: Quit when a syntax file was already loaded @@ -16,17 +16,6 @@ elseif exists("b:current_syntax") finish endif -" AFAICT "." should be considered part of the iskeyword for ksh. Using iskeywords -" in syntax is dicey, so the following code permits the user to prevent/override -" g:sh_isk set to a string : specify iskeyword. -" g:sh_noisk exists : don't change iskeyword -" g:sh_noisk does not exist : (default) append "." to iskeyword for kornshell -if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword - exe "setl isk=".g:sh_isk -elseif !exists("g:sh_noisk") && exists("b:is_kornshell") " append '.' to iskeyword - setl isk+=. -endif - " trying to answer the question: which shell is /bin/sh, really? " If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") @@ -73,6 +62,7 @@ if !exists("b:is_kornshell") && !exists("b:is_bash") endif " set up default g:sh_fold_enabled {{{1 +" ================================ if !exists("g:sh_fold_enabled") let g:sh_fold_enabled= 0 elseif g:sh_fold_enabled != 0 && !has("folding") @@ -95,6 +85,24 @@ if g:sh_fold_enabled && &fdm == "manual" setl fdm=syntax endif +" Set up folding commands for shell {{{1 +" ================================= +if s:sh_fold_functions + com! -nargs=* ShFoldFunctions fold +else + com! -nargs=* ShFoldFunctions +endif +if s:sh_fold_heredoc + com! -nargs=* ShFoldHereDoc fold +else + com! -nargs=* ShFoldHereDoc +endif +if s:sh_fold_ifdofor + com! -nargs=* ShFoldIfDoFor fold +else + com! -nargs=* ShFoldIfDoFor +endif + " sh syntax is case sensitive {{{1 syn case match @@ -126,9 +134,10 @@ syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo -syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr +syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr + " Echo: {{{1 " ==== " This one is needed INSIDE a CommandSub, so that `echo bla` be correct @@ -145,6 +154,11 @@ if exists("b:is_kornshell") || exists("b:is_bash") syn match shStatement "\" syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" + + " Touch: {{{1 + " ===== + syn match shTouch '\[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd + syn match shTouchCmd '\' contained endif " Error Codes: {{{1 @@ -193,15 +207,16 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" "======= syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial syn region shTest transparent matchgroup=shStatement start="\