aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/c.vim6
-rw-r--r--runtime/syntax/fortran.vim15
-rw-r--r--runtime/syntax/mysql.vim30
-rw-r--r--runtime/syntax/python.vim4
-rw-r--r--runtime/syntax/r.vim62
-rw-r--r--runtime/syntax/rhelp.vim246
-rw-r--r--runtime/syntax/rmd.vim10
-rw-r--r--runtime/syntax/rnoweb.vim33
-rw-r--r--runtime/syntax/rrst.vim8
-rw-r--r--runtime/syntax/sh.vim26
-rw-r--r--runtime/syntax/sshconfig.vim85
-rw-r--r--runtime/syntax/sshdconfig.vim76
-rw-r--r--runtime/syntax/tex.vim76
-rw-r--r--runtime/syntax/vhdl.vim101
-rw-r--r--runtime/syntax/zsh.vim25
15 files changed, 487 insertions, 316 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 32b63e09e4..3fe3256059 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Feb 08
+" Last Change: 2016 Apr 10
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -248,6 +248,10 @@ if !exists("c_no_c99") " ISO C99
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
syn keyword cType int8_t int16_t int32_t int64_t
syn keyword cType uint8_t uint16_t uint32_t uint64_t
+ if !exists("c_no_bsd")
+ " These are BSD specific.
+ syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
+ endif
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index 26d063524e..b470e56f60 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,15 +1,16 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: 0.96
-" Last Change: 2015 Nov. 30
+" Version: 0.97
+" Last Change: 2016 Feb. 26
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
-" Version 0.1 was based on the fortran 77 syntax file by Mario Eusebio and
-" Preben Guldberg. Useful suggestions and contributions were made by: Andrej Panjkov,
-" Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
+" Version 0.1 (April 2000) was based on the fortran 77 syntax file by Mario Eusebio and
+" Preben Guldberg. Since then, useful suggestions and contributions have been made,
+" in chronological order, by:
+" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonn, Alexander Wagner, Roman Bertle, Charles Rendleman,
-" Andrew Griffiths, Joe Krahn, Hendrik Merx, and Matt Thompson.
+" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, and Jan Hermann.
if exists("b:current_syntax")
finish
@@ -407,7 +408,7 @@ if exists("fortran_fold")
else
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
endif
endif
diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim
index c01ecc192b..d7cf74710d 100644
--- a/runtime/syntax/mysql.vim
+++ b/runtime/syntax/mysql.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: mysql
" Maintainer: Kenneth J. Pronovici <pronovic@ieee.org>
-" Last Change: $LastChangedDate: 2010-04-22 09:48:02 -0500 (Thu, 22 Apr 2010) $
+" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $
" Filenames: *.mysql
" URL: ftp://cedar-solutions.com/software/mysql.vim
" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23
@@ -18,7 +18,7 @@ endif
syn case ignore
" General keywords which don't fall into other categories
-syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg avg_row_length
+syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg_row_length
syn keyword mysqlKeyword both by
syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross
syn keyword mysqlKeyword current_date current_time current_timestamp
@@ -30,7 +30,7 @@ syn keyword mysqlKeyword global grant grants group
syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second
syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam
syn keyword mysqlKeyword join
-syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long
+syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long
syn keyword mysqlKeyword low_priority
syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam
syn keyword mysqlKeyword natural no
@@ -64,6 +64,9 @@ syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>"
" User variables
syn match mysqlVariable "@\a*[A-Za-z0-9]*\([._]*[A-Za-z0-9]\)*"
+" Escaped column names
+syn match mysqlEscaped "`[^`]*`"
+
" Comments (c-style, mysql-style and modified sql-style)
syn region mysqlComment start="/\*" end="\*/"
syn match mysqlComment "#.*"
@@ -84,14 +87,14 @@ syn sync ccomment mysqlComment
" The second problem is that some of these keywords are included in
" function names. For instance, year() is part of the name of the
" dayofyear() function, and the dec keyword (no parenthesis) is part of
-" the name of the decode() function.
+" the name of the decode() function.
-syn keyword mysqlType tinyint smallint mediumint int integer bigint
-syn keyword mysqlType date datetime time bit bool
+syn keyword mysqlType tinyint smallint mediumint int integer bigint
+syn keyword mysqlType date datetime time bit bool
syn keyword mysqlType tinytext mediumtext longtext text
syn keyword mysqlType tinyblob mediumblob longblob blob
-syn region mysqlType start="float\W" end="."me=s-1
-syn region mysqlType start="float$" end="."me=s-1
+syn region mysqlType start="float\W" end="."me=s-1
+syn region mysqlType start="float$" end="."me=s-1
syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable
syn region mysqlType start="double\W" end="."me=s-1
syn region mysqlType start="double$" end="."me=s-1
@@ -139,12 +142,12 @@ syn region mysqlFlow start="if(" end=")" contains=ALL
"
" I'm leery of just defining keywords for functions, since according to the MySQL manual:
"
-" Function names do not clash with table or column names. For example, ABS is a
-" valid column name. The only restriction is that for a function call, no spaces
-" are allowed between the function name and the `(' that follows it.
+" Function names do not clash with table or column names. For example, ABS is a
+" valid column name. The only restriction is that for a function call, no spaces
+" are allowed between the function name and the `(' that follows it.
"
-" This means that if I want to highlight function names properly, I have to use a
-" region to define them, not just a keyword. This will probably cause the syntax file
+" This means that if I want to highlight function names properly, I have to use a
+" region to define them, not just a keyword. This will probably cause the syntax file
" to load more slowly, but at least it will be 'correct'.
syn region mysqlFunction start="abs(" end=")" contains=ALL
@@ -154,6 +157,7 @@ syn region mysqlFunction start="ascii(" end=")" contains=ALL
syn region mysqlFunction start="asin(" end=")" contains=ALL
syn region mysqlFunction start="atan(" end=")" contains=ALL
syn region mysqlFunction start="atan2(" end=")" contains=ALL
+syn region mysqlFunction start="avg(" end=")" contains=ALL
syn region mysqlFunction start="benchmark(" end=")" contains=ALL
syn region mysqlFunction start="bin(" end=")" contains=ALL
syn region mysqlFunction start="bit_and(" end=")" contains=ALL
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 78d35e4c15..2a0ea5de2b 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
-" Last Change: 2015 Sep 15
+" Last Change: 2016 Feb 20
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -199,6 +199,8 @@ if !exists("python_no_builtin_highlight")
syn keyword pythonBuiltin ascii bytes exec
" non-essential built-in functions; Python 2 only
syn keyword pythonBuiltin apply buffer coerce intern
+ " avoid highlighting attributes as builtins
+ syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
endif
" From the 'Python Library Reference' class hierarchy at the bottom.
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index e48b6686cb..d96bf96acb 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -5,17 +5,21 @@
" Tom Payne <tom@tompayne.org>
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Wed Oct 21, 2015 06:33AM
+" Last Change: Thu Mar 10, 2016 12:26PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in
" runtime files created by a filetype plugin, if installed.
"
" CONFIGURATION:
-" syntax folding can be turned on by
+" Syntax folding can be turned on by
"
" let r_syntax_folding = 1
"
+" ROxygen highlighting can be turned off by
+"
+" let r_hl_roxygen = 0
+"
" Some lines of code were borrowed from Zhuojun Chen.
if exists("b:current_syntax")
@@ -24,9 +28,12 @@ endif
setlocal iskeyword=@,48-57,_,.
-if exists("g:r_syntax_folding")
+if exists("g:r_syntax_folding") && g:r_syntax_folding
setlocal foldmethod=syntax
endif
+if !exists("g:r_hl_roxygen")
+ let g:r_hl_roxygen = 1
+endif
syn case match
@@ -35,18 +42,20 @@ syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*"
" Roxygen
-syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
-syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey
-syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained
-
-syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword
-
-syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)"
-syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
-syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
-syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)"
-syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
-syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
+if g:r_hl_roxygen
+ syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
+ syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey
+ syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained
+
+ syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword
+
+ syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)"
+ syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
+ syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
+ syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)"
+ syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
+ syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
+endif
if &filetype == "rhelp"
@@ -159,12 +168,13 @@ syn match rBraceError "[)}]" contained
syn match rCurlyError "[)\]]" contained
syn match rParenError "[\]}]" contained
-" Source list of R functions produced by a filetype plugin (if installed)
-if has("nvim")
- " Nvim-R
+if !exists("g:R_hi_fun")
+ let g:R_hi_fun = 1
+endif
+if g:R_hi_fun
+ " Nvim-R:
runtime R/functions.vim
-else
- " Vim-R-plugin
+ " Vim-R-plugin:
runtime r-plugin/functions.vim
endif
@@ -235,11 +245,13 @@ hi def link rStatement Statement
hi def link rString String
hi def link rStrError Error
hi def link rType Type
-hi def link rOKeyword Title
-hi def link rOBlock Comment
-hi def link rOTitle Title
-hi def link rOCommentKey Comment
-hi def link rOExamples SpecialComment
+if g:r_hl_roxygen
+ hi def link rOKeyword Title
+ hi def link rOBlock Comment
+ hi def link rOTitle Title
+ hi def link rOCommentKey Comment
+ hi def link rOExamples SpecialComment
+endif
let b:current_syntax="r"
diff --git a/runtime/syntax/rhelp.vim b/runtime/syntax/rhelp.vim
index 32c91add48..47c764e296 100644
--- a/runtime/syntax/rhelp.vim
+++ b/runtime/syntax/rhelp.vim
@@ -2,25 +2,21 @@
" Language: R Help File
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
-" Last Change: Wed Jul 09, 2014 10:28PM
+" Homepage: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: Sat Feb 06, 2016 11:34AM
" Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
" - There is no Latex markup in equations
" - Thanks to Will Gray for finding and fixing a bug
-" - No support for \if, \ifelse and \out as I don't understand
-" them and have no examples at hand (help welcome).
-" - No support for \var tag within quoted string (dito)
+" - No support for \var tag within quoted string
" Version Clears: {{{1
-" For version 5.x: Clear all syntax items
-" For version 6.x and 7.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
+scriptencoding utf-8
setlocal iskeyword=@,48-57,_,.
syn case match
@@ -29,9 +25,11 @@ syn case match
syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink
+syn region rhelpIdentifier matchgroup=rhelpSection start="\\CRANpkg{" end="}" contains=rhelpLink
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
+
" Highlighting of R code using an existing r.vim syntax file if available {{{1
syn include @R syntax/r.vim
@@ -69,76 +67,115 @@ syn match rhelpDelimiter "\\cr"
syn match rhelpDelimiter "\\tab "
" Keywords {{{1
-syn match rhelpKeyword "\\R"
-syn match rhelpKeyword "\\ldots"
+syn match rhelpKeyword "\\R\>"
+syn match rhelpKeyword "\\ldots\>"
+syn match rhelpKeyword "\\sspace\>"
syn match rhelpKeyword "--"
syn match rhelpKeyword "---"
-syn match rhelpKeyword "<"
-syn match rhelpKeyword ">"
-syn match rhelpKeyword "\\ge"
-syn match rhelpKeyword "\\le"
-syn match rhelpKeyword "\\alpha"
-syn match rhelpKeyword "\\beta"
-syn match rhelpKeyword "\\gamma"
-syn match rhelpKeyword "\\delta"
-syn match rhelpKeyword "\\epsilon"
-syn match rhelpKeyword "\\zeta"
-syn match rhelpKeyword "\\eta"
-syn match rhelpKeyword "\\theta"
-syn match rhelpKeyword "\\iota"
-syn match rhelpKeyword "\\kappa"
-syn match rhelpKeyword "\\lambda"
-syn match rhelpKeyword "\\mu"
-syn match rhelpKeyword "\\nu"
-syn match rhelpKeyword "\\xi"
-syn match rhelpKeyword "\\omicron"
-syn match rhelpKeyword "\\pi"
-syn match rhelpKeyword "\\rho"
-syn match rhelpKeyword "\\sigma"
-syn match rhelpKeyword "\\tau"
-syn match rhelpKeyword "\\upsilon"
-syn match rhelpKeyword "\\phi"
-syn match rhelpKeyword "\\chi"
-syn match rhelpKeyword "\\psi"
-syn match rhelpKeyword "\\omega"
-syn match rhelpKeyword "\\Alpha"
-syn match rhelpKeyword "\\Beta"
-syn match rhelpKeyword "\\Gamma"
-syn match rhelpKeyword "\\Delta"
-syn match rhelpKeyword "\\Epsilon"
-syn match rhelpKeyword "\\Zeta"
-syn match rhelpKeyword "\\Eta"
-syn match rhelpKeyword "\\Theta"
-syn match rhelpKeyword "\\Iota"
-syn match rhelpKeyword "\\Kappa"
-syn match rhelpKeyword "\\Lambda"
-syn match rhelpKeyword "\\Mu"
-syn match rhelpKeyword "\\Nu"
-syn match rhelpKeyword "\\Xi"
-syn match rhelpKeyword "\\Omicron"
-syn match rhelpKeyword "\\Pi"
-syn match rhelpKeyword "\\Rho"
-syn match rhelpKeyword "\\Sigma"
-syn match rhelpKeyword "\\Tau"
-syn match rhelpKeyword "\\Upsilon"
-syn match rhelpKeyword "\\Phi"
-syn match rhelpKeyword "\\Chi"
-syn match rhelpKeyword "\\Psi"
-syn match rhelpKeyword "\\Omega"
-" Links {{{1
-syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend extend
-syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend extend
-syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
+" Condition Keywords {{{2
+syn match rhelpKeyword "\\if\>"
+syn match rhelpKeyword "\\ifelse\>"
+syn match rhelpKeyword "\\out\>"
+" Examples of usage:
+" \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}}
+" \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{&alpha;}}{alpha}}
-" Verbatim like {{{1
-if v:version > 703
- syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
- syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+" Keywords and operators valid only if in math mode {{{2
+syn match rhelpMathOp "<" contained
+syn match rhelpMathOp ">" contained
+syn match rhelpMathOp "+" contained
+syn match rhelpMathOp "-" contained
+syn match rhelpMathOp "=" contained
+
+" Conceal function based on syntax/tex.vim {{{2
+if exists("g:tex_conceal")
+ let s:tex_conceal = g:tex_conceal
else
- syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
- syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+ let s:tex_conceal = 'gm'
endif
+function s:HideSymbol(pat, cchar, hide)
+ if a:hide
+ exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar
+ else
+ exe "syn match rhelpMathSymb '" . a:pat . "' contained"
+ endif
+endfunction
+
+" Math symbols {{{2
+if s:tex_conceal =~ 'm'
+ let s:hd = 1
+else
+ let s:hd = 0
+endif
+call s:HideSymbol('\\infty\>', '∞', s:hd)
+call s:HideSymbol('\\ge\>', '≥', s:hd)
+call s:HideSymbol('\\le\>', '≤', s:hd)
+call s:HideSymbol('\\prod\>', '∏', s:hd)
+call s:HideSymbol('\\sum\>', '∑', s:hd)
+syn match rhelpMathSymb "\\sqrt\>" contained
+
+" Greek letters {{{2
+if s:tex_conceal =~ 'g'
+ let s:hd = 1
+else
+ let s:hd = 0
+endif
+call s:HideSymbol('\\alpha\>', 'α', s:hd)
+call s:HideSymbol('\\beta\>', 'β', s:hd)
+call s:HideSymbol('\\gamma\>', 'γ', s:hd)
+call s:HideSymbol('\\delta\>', 'δ', s:hd)
+call s:HideSymbol('\\epsilon\>', 'ϵ', s:hd)
+call s:HideSymbol('\\zeta\>', 'ζ', s:hd)
+call s:HideSymbol('\\eta\>', 'η', s:hd)
+call s:HideSymbol('\\theta\>', 'θ', s:hd)
+call s:HideSymbol('\\iota\>', 'ι', s:hd)
+call s:HideSymbol('\\kappa\>', 'κ', s:hd)
+call s:HideSymbol('\\lambda\>', 'λ', s:hd)
+call s:HideSymbol('\\mu\>', 'μ', s:hd)
+call s:HideSymbol('\\nu\>', 'ν', s:hd)
+call s:HideSymbol('\\xi\>', 'ξ', s:hd)
+call s:HideSymbol('\\pi\>', 'π', s:hd)
+call s:HideSymbol('\\rho\>', 'ρ', s:hd)
+call s:HideSymbol('\\sigma\>', 'σ', s:hd)
+call s:HideSymbol('\\tau\>', 'τ', s:hd)
+call s:HideSymbol('\\upsilon\>', 'υ', s:hd)
+call s:HideSymbol('\\phi\>', 'ϕ', s:hd)
+call s:HideSymbol('\\chi\>', 'χ', s:hd)
+call s:HideSymbol('\\psi\>', 'ψ', s:hd)
+call s:HideSymbol('\\omega\>', 'ω', s:hd)
+call s:HideSymbol('\\Gamma\>', 'Γ', s:hd)
+call s:HideSymbol('\\Delta\>', 'Δ', s:hd)
+call s:HideSymbol('\\Theta\>', 'Θ', s:hd)
+call s:HideSymbol('\\Lambda\>', 'Λ', s:hd)
+call s:HideSymbol('\\Xi\>', 'Ξ', s:hd)
+call s:HideSymbol('\\Pi\>', 'Π', s:hd)
+call s:HideSymbol('\\Sigma\>', 'Σ', s:hd)
+call s:HideSymbol('\\Upsilon\>', 'Υ', s:hd)
+call s:HideSymbol('\\Phi\>', 'Φ', s:hd)
+call s:HideSymbol('\\Psi\>', 'Ψ', s:hd)
+call s:HideSymbol('\\Omega\>', 'Ω', s:hd)
+delfunction s:HideSymbol
+" Note: The letters 'omicron', 'Alpha', 'Beta', 'Epsilon', 'Zeta', 'Eta',
+" 'Iota', 'Kappa', 'Mu', 'Nu', 'Omicron', 'Rho', 'Tau' and 'Chi' are listed
+" at src/library/tools/R/Rd2txt.R because they are valid in HTML, although
+" they do not make valid LaTeX code (e.g. &Alpha; versus \Alpha).
+
+" Links {{{1
+syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\linkS4class{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\url{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\href{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\figure{" end="}" contained keepend extend
+
+" Verbatim like {{{1
+syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+
+" Equation {{{1
+syn region rhelpEquation matchgroup=rhelpType start="\\eqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
+syn region rhelpEquation matchgroup=rhelpType start="\\deqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
" Type Styles {{{1
syn match rhelpType "\\emph\>"
@@ -148,12 +185,9 @@ syn match rhelpType "\\sQuote\>"
syn match rhelpType "\\dQuote\>"
syn match rhelpType "\\preformatted\>"
syn match rhelpType "\\kbd\>"
-syn match rhelpType "\\eqn\>"
-syn match rhelpType "\\deqn\>"
syn match rhelpType "\\file\>"
syn match rhelpType "\\email\>"
-syn match rhelpType "\\url\>"
-syn match rhelpType "\\href\>"
+syn match rhelpType "\\enc\>"
syn match rhelpType "\\var\>"
syn match rhelpType "\\env\>"
syn match rhelpType "\\option\>"
@@ -163,6 +197,7 @@ syn match rhelpType "\\renewcommand\>"
syn match rhelpType "\\dfn\>"
syn match rhelpType "\\cite\>"
syn match rhelpType "\\acronym\>"
+syn match rhelpType "\\doi\>"
" rhelp sections {{{1
syn match rhelpSection "\\encoding\>"
@@ -202,9 +237,9 @@ syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}"
syn match rhelpComment /%.*$/
" Error {{{1
-syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
-syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
-syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
+syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
+syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
+syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
syn match rhelpError /[)\]}]/
syn match rhelpBraceError /[)}]/ contained
syn match rhelpCurlyError /[)\]]/ contained
@@ -213,36 +248,27 @@ syn match rhelpParenError /[\]}]/ contained
syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
" Define the default highlighting {{{1
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_rhelp_syntax_inits")
- if version < 508
- let did_rhelp_syntax_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
- HiLink rhelpVerbatim String
- HiLink rhelpDelimiter Delimiter
- HiLink rhelpIdentifier Identifier
- HiLink rhelpString String
- HiLink rhelpCodeSpecial Special
- HiLink rhelpKeyword Keyword
- HiLink rhelpDots Keyword
- HiLink rhelpLink Underlined
- HiLink rhelpType Type
- HiLink rhelpSection PreCondit
- HiLink rhelpError Error
- HiLink rhelpBraceError Error
- HiLink rhelpCurlyError Error
- HiLink rhelpParenError Error
- HiLink rhelpPreProc PreProc
- HiLink rhelpDelimiter Delimiter
- HiLink rhelpComment Comment
- HiLink rhelpRComment Comment
- HiLink rhelpSpecialChar SpecialChar
- delcommand HiLink
-endif
+hi def link rhelpVerbatim String
+hi def link rhelpDelimiter Delimiter
+hi def link rhelpIdentifier Identifier
+hi def link rhelpString String
+hi def link rhelpCodeSpecial Special
+hi def link rhelpKeyword Keyword
+hi def link rhelpDots Keyword
+hi def link rhelpLink Underlined
+hi def link rhelpType Type
+hi def link rhelpSection PreCondit
+hi def link rhelpError Error
+hi def link rhelpBraceError Error
+hi def link rhelpCurlyError Error
+hi def link rhelpParenError Error
+hi def link rhelpPreProc PreProc
+hi def link rhelpDelimiter Delimiter
+hi def link rhelpComment Comment
+hi def link rhelpRComment Comment
+hi def link rhelpSpecialChar SpecialChar
+hi def link rhelpMathSymb Special
+hi def link rhelpMathOp Operator
let b:current_syntax = "rhelp"
diff --git a/runtime/syntax/rmd.vim b/runtime/syntax/rmd.vim
index 6f1b847453..4cde7441d3 100644
--- a/runtime/syntax/rmd.vim
+++ b/runtime/syntax/rmd.vim
@@ -1,15 +1,13 @@
" markdown Text with R statements
" Language: markdown with R code chunks
-" Last Change: Wed Jul 09, 2014 10:29PM
+" Homepage: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: Sat Feb 06, 2016 06:45AM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
" let rmd_syn_hl_chunk = 1
-" for portability
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
@@ -58,6 +56,8 @@ if rmdIsPandoc == 0
if exists("b:current_syntax")
unlet b:current_syntax
endif
+ " Extend cluster
+ syn cluster texMathZoneGroup add=rmdrInline
" Inline
syntax match rmdLaTeXInlDelim "\$"
syntax match rmdLaTeXInlDelim "\\\$"
diff --git a/runtime/syntax/rnoweb.vim b/runtime/syntax/rnoweb.vim
index 7d42395b5c..665acc53e2 100644
--- a/runtime/syntax/rnoweb.vim
+++ b/runtime/syntax/rnoweb.vim
@@ -1,20 +1,14 @@
" Vim syntax file
" Language: R noweb Files
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
-" Last Change: 2009 May 05
-" Version: 0.9
-" SVN: $Id: rnoweb.vim 84 2009-05-03 19:52:47Z ranke $
+" Last Change: Sat Feb 06, 2016 06:47AM
+" Version: 0.9.1
" Remarks: - This file is inspired by the proposal of
-" Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
-" http://www.ime.usp.br/~feferraz/en/sweavevim.html
+" Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
+" http://www.ime.usp.br/~feferraz/en/sweavevim.html
"
-" Version Clears: {{{1
-" For version 5.x: Clear all syntax items
-" For version 6.x and 7.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
@@ -26,21 +20,22 @@ unlet b:current_syntax
syn cluster texMatchGroup add=@rnoweb
syn cluster texMathMatchGroup add=rnowebSexpr
+syn cluster texMathZoneGroup add=rnowebSexpr
syn cluster texEnvGroup add=@rnoweb
syn cluster texFoldGroup add=@rnoweb
-syn cluster texDocGroup add=@rnoweb
-syn cluster texPartGroup add=@rnoweb
-syn cluster texChapterGroup add=@rnoweb
-syn cluster texSectionGroup add=@rnoweb
-syn cluster texSubSectionGroup add=@rnoweb
-syn cluster texSubSubSectionGroup add=@rnoweb
-syn cluster texParaGroup add=@rnoweb
+syn cluster texDocGroup add=@rnoweb
+syn cluster texPartGroup add=@rnoweb
+syn cluster texChapterGroup add=@rnoweb
+syn cluster texSectionGroup add=@rnoweb
+syn cluster texSubSectionGroup add=@rnoweb
+syn cluster texSubSubSectionGroup add=@rnoweb
+syn cluster texParaGroup add=@rnoweb
" Highlighting of R code using an existing r.vim syntax file if available {{{1
syn include @rnowebR syntax/r.vim
syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend
syn match rnowebChunkReference "^<<.*>>$" contained
-syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR
+syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR contained
" Sweave options command {{{1
syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}"
diff --git a/runtime/syntax/rrst.vim b/runtime/syntax/rrst.vim
index 4667b3a2c1..24d3844df0 100644
--- a/runtime/syntax/rrst.vim
+++ b/runtime/syntax/rrst.vim
@@ -1,16 +1,14 @@
" reStructured Text with R statements
" Language: reST with R code chunks
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
-" Last Change: Wed Jul 09, 2014 10:29PM
+" Homepage: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: Sat Feb 06, 2016 06:45AM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
" let rrst_syn_hl_chunk = 1
-" for portability
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 15a00eb516..6ef5bf0d16 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Feb 16, 2016
-" Version: 144
+" Last Change: Apr 11, 2016
+" Version: 147
" 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 Eric Brunet (eric.brunet@ens.fr)
@@ -185,7 +185,7 @@ endif
" Options: {{{1
" ====================
-syn match shOption "\s\zs[-+][-_a-zA-Z0-9#]\+"
+syn match shOption "\s\zs[-+][-_a-zA-Z#@]\+"
syn match shOption "\s\zs--[^ \t$`'"|);]\+"
" File Redirection Highlighted As Operators: {{{1
@@ -317,7 +317,8 @@ syn match shColon '^\s*\zs:'
" String And Character Constants: {{{1
"================================
-syn match shNumber "-\=\<\d\+\>#\="
+syn match shNumber "\<\d\+\>#\="
+syn match shNumber "-\=\.\=\d\+\>#\="
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
if exists("b:is_bash")
syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
@@ -538,13 +539,20 @@ endif
" Synchronization: {{{1
" ================
-if !exists("sh_minlines")
- let sh_minlines = 200
+if !exists("g:sh_minlines")
+ let s:sh_minlines = 200
+else
+ let s:sh_minlines= g:sh_minlines
endif
-if !exists("sh_maxlines")
- let sh_maxlines = 2 * sh_minlines
+if !exists("g:sh_maxlines")
+ let s:sh_maxlines = 2*s:sh_minlines
+ if s:sh_maxlines < 25
+ let s:sh_maxlines= 25
+ endif
+else
+ let s:sh_maxlines= g:sh_maxlines
endif
-exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines
+exec "syn sync minlines=" . s:sh_minlines . " maxlines=" . s:sh_maxlines
syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>"
syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>"
syn sync match shDoSync grouphere shDo "\<do\>"
diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim
index ef2ca07976..44b3c67a96 100644
--- a/runtime/syntax/sshconfig.vim
+++ b/runtime/syntax/sshconfig.vim
@@ -4,8 +4,8 @@
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
-" Last Change: 2016 Jan 15
-" SSH Version: 7.1
+" Last Change: 2016 Mar 1
+" SSH Version: 7.2
"
" Setup
@@ -40,26 +40,57 @@ syn keyword sshconfigYesNo yes no ask
syn keyword sshconfigYesNo any auto
syn keyword sshconfigYesNo force autoask none
-syn keyword sshconfigCipher 3des blowfish
-syn keyword sshconfigCiphers aes128-cbc 3des-cbc blowfish blowfish-cbc cast128-cbc
-syn keyword sshconfigCiphers aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
-syn keyword sshconfigCiphers arcfour arcfour128 arcfour256 cast128-cbc
+syn keyword sshconfigCipher 3des blowfish
-syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
-syn keyword sshconfigMAC hmac-md5-96
-syn keyword sshconfigMAC hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512
-syn keyword sshconfigMAC hmac-sha2-512-96
+syn keyword sshconfigCiphers 3des-cbc
+syn keyword sshconfigCiphers blowfish-cbc
+syn keyword sshconfigCiphers cast128-cbc
+syn keyword sshconfigCiphers arcfour
+syn keyword sshconfigCiphers arcfour128
+syn keyword sshconfigCiphers arcfour256
+syn keyword sshconfigCiphers aes128-cbc
+syn keyword sshconfigCiphers aes192-cbc
+syn keyword sshconfigCiphers aes256-cbc
+syn match sshconfigCiphers "\<rijndael-cbc@lysator\.liu.se\>"
+syn keyword sshconfigCiphers aes128-ctr
+syn keyword sshconfigCiphers aes192-ctr
+syn keyword sshconfigCiphers aes256-ctr
+syn match sshconfigCiphers "\<aes128-gcm@openssh\.com\>"
+syn match sshconfigCiphers "\<aes256-gcm@openssh\.com\>"
+syn match sshconfigCiphers "\<chacha20-poly1305@openssh\.com\>"
+
+syn keyword sshconfigMAC hmac-sha1
+syn keyword sshconfigMAC mac-sha1-96
+syn keyword sshconfigMAC mac-sha2-256
+syn keyword sshconfigMAC mac-sha2-512
+syn keyword sshconfigMAC mac-md5
+syn keyword sshconfigMAC mac-md5-96
+syn keyword sshconfigMAC mac-ripemd160
+syn match sshconfigMAC "\<hmac-ripemd160@openssh\.com\>"
syn match sshconfigMAC "\<umac-64@openssh\.com\>"
+syn match sshconfigMAC "\<umac-128@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-sha1-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-sha1-96-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-sha2-256-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-sha2-512-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-md5-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-md5-96-etm@openssh\.com\>"
+syn match sshconfigMAC "\<hmac-ripemd160-etm@openssh\.com\>"
+syn match sshconfigMAC "\<umac-64-etm@openssh\.com\>"
+syn match sshconfigMAC "\<umac-128-etm@openssh\.com\>"
-syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
-syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v01@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v01@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v00@openssh\.com\>"
-syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v00@openssh\.com\>"
-syn keyword sshconfigHostKeyAlg ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521
+syn keyword sshconfigHostKeyAlgo ssh-ed25519
+syn match sshconfigHostKeyAlgo "\<ssh-ed25519-cert-v01@openssh\.com\>"
+syn keyword sshconfigHostKeyAlgo ssh-rsa
+syn keyword sshconfigHostKeyAlgo ssh-dss
+syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp256
+syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp384
+syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp521
+syn match sshconfigHostKeyAlgo "\<ssh-rsa-cert-v01@openssh\.com\>"
+syn match sshconfigHostKeyAlgo "\<ssh-dss-cert-v01@openssh\.com\>"
+syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
+syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
+syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic
syn keyword sshconfigPreferredAuth keyboard-interactive
@@ -78,11 +109,14 @@ syn match sshconfigIPQoS "cs[0-7]"
syn keyword sshconfigIPQoS ef lowdelay throughput reliability
syn keyword sshconfigKbdInteractive bsdauth pam skey
-syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521
-syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256
-syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1
-syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1
-syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1
+syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1
+syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1
+syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1
+syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256
+syn keyword sshconfigKexAlgo ecdh-sha2-nistp256
+syn keyword sshconfigKexAlgo ecdh-sha2-nistp384
+syn keyword sshconfigKexAlgo ecdh-sha2-nistp521
+syn match sshconfigKexAlgo "\<curve25519-sha256@libssh\.org\>"
syn keyword sshconfigTunnel point-to-point ethernet
@@ -111,6 +145,7 @@ syn keyword sshconfigKeyword CanonicalDomains
syn keyword sshconfigKeyword CanonicalizeFallbackLocal
syn keyword sshconfigKeyword CanonicalizeHostname
syn keyword sshconfigKeyword CanonicalizeMaxDots
+syn keyword sshconfigKeyword CertificateFile
syn keyword sshconfigKeyword ChallengeResponseAuthentication
syn keyword sshconfigKeyword CheckHostIP
syn keyword sshconfigKeyword Cipher
@@ -212,7 +247,7 @@ if version >= 508 || !exists("did_sshconfig_syntax_inits")
HiLink sshconfigCipher sshconfigEnum
HiLink sshconfigCiphers sshconfigEnum
HiLink sshconfigMAC sshconfigEnum
- HiLink sshconfigHostKeyAlg sshconfigEnum
+ HiLink sshconfigHostKeyAlgo sshconfigEnum
HiLink sshconfigLogLevel sshconfigEnum
HiLink sshconfigSysLogFacility sshconfigEnum
HiLink sshconfigAddressFamily sshconfigEnum
diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim
index 4203047d2c..6b7b98d893 100644
--- a/runtime/syntax/sshdconfig.vim
+++ b/runtime/syntax/sshdconfig.vim
@@ -6,8 +6,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
-" Last Change: 2016 Jan 12
-" SSH Version: 7.1
+" Last Change: 2016 Mar 1
+" SSH Version: 7.2
"
" Setup
@@ -47,15 +47,55 @@ syn keyword sshdconfigTcpForwarding local remote
syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only
-syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
-syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
-syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
-
-syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
-syn keyword sshdconfigMAC hmac-md5-96
-syn keyword sshdconfigMAC hmac-sha2-256 hmac-sha256-96 hmac-sha2-512
-syn keyword sshdconfigMAC hmac-sha2-512-96
+syn keyword sshdconfigCiphers 3des-cbc
+syn keyword sshdconfigCiphers blowfish-cbc
+syn keyword sshdconfigCiphers cast128-cbc
+syn keyword sshdconfigCiphers arcfour
+syn keyword sshdconfigCiphers arcfour128
+syn keyword sshdconfigCiphers arcfour256
+syn keyword sshdconfigCiphers aes128-cbc
+syn keyword sshdconfigCiphers aes192-cbc
+syn keyword sshdconfigCiphers aes256-cbc
+syn match sshdconfigCiphers "\<rijndael-cbc@lysator\.liu.se\>"
+syn keyword sshdconfigCiphers aes128-ctr
+syn keyword sshdconfigCiphers aes192-ctr
+syn keyword sshdconfigCiphers aes256-ctr
+syn match sshdconfigCiphers "\<aes128-gcm@openssh\.com\>"
+syn match sshdconfigCiphers "\<aes256-gcm@openssh\.com\>"
+syn match sshdconfigCiphers "\<chacha20-poly1305@openssh\.com\>"
+
+syn keyword sshdconfigMAC hmac-sha1
+syn keyword sshdconfigMAC mac-sha1-96
+syn keyword sshdconfigMAC mac-sha2-256
+syn keyword sshdconfigMAC mac-sha2-512
+syn keyword sshdconfigMAC mac-md5
+syn keyword sshdconfigMAC mac-md5-96
+syn keyword sshdconfigMAC mac-ripemd160
+syn match sshdconfigMAC "\<hmac-ripemd160@openssh\.com\>"
syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
+syn match sshdconfigMAC "\<umac-128@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-sha1-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-sha1-96-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-sha2-256-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-sha2-512-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-md5-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-md5-96-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<hmac-ripemd160-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<umac-64-etm@openssh\.com\>"
+syn match sshdconfigMAC "\<umac-128-etm@openssh\.com\>"
+
+syn keyword sshdconfigHostKeyAlgo ssh-ed25519
+syn match sshdconfigHostKeyAlgo "\<ssh-ed25519-cert-v01@openssh\.com\>"
+syn keyword sshdconfigHostKeyAlgo ssh-rsa
+syn keyword sshdconfigHostKeyAlgo ssh-dss
+syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp256
+syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp384
+syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp521
+syn match sshdconfigHostKeyAlgo "\<ssh-rsa-cert-v01@openssh\.com\>"
+syn match sshdconfigHostKeyAlgo "\<ssh-dss-cert-v01@openssh\.com\>"
+syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
+syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
+syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only
@@ -73,11 +113,14 @@ syn match sshdconfigIPQoS "af4[123]"
syn match sshdconfigIPQoS "cs[0-7]"
syn keyword sshdconfigIPQoS ef lowdelay throughput reliability
-syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521
-syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256
-syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1
-syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
-syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
+syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
+syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
+syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1
+syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256
+syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256
+syn keyword sshdconfigKexAlgo ecdh-sha2-nistp384
+syn keyword sshdconfigKexAlgo ecdh-sha2-nistp521
+syn match sshdconfigKexAlgo "\<curve25519-sha256@libssh\.org\>"
syn keyword sshdconfigTunnel point-to-point ethernet
@@ -215,8 +258,9 @@ if version >= 508 || !exists("did_sshdconfig_syntax_inits")
HiLink sshdconfigPrivilegeSeparation sshdconfigEnum
HiLink sshdconfigTcpForwarding sshdconfigEnum
HiLink sshdconfigRootLogin sshdconfigEnum
- HiLink sshdconfigCipher sshdconfigEnum
+ HiLink sshdconfigCiphers sshdconfigEnum
HiLink sshdconfigMAC sshdconfigEnum
+ HiLink sshdconfigHostKeyAlgo sshdconfigEnum
HiLink sshdconfigRootLogin sshdconfigEnum
HiLink sshdconfigLogLevel sshdconfigEnum
HiLink sshdconfigSysLogFacility sshdconfigEnum
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 40013b5b99..d6d5dd81ee 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: Jan 20, 2016
-" Version: 91
+" Last Change: Apr 11, 2016
+" Version: 94
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -83,10 +83,14 @@ else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
- let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
+ let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
+else
+ let s:tex_superscripts= g:tex_superscripts
endif
if !exists("g:tex_subscripts")
- let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
+ let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
+else
+ let s:tex_subscripts= g:tex_subscripts
endif
" Determine whether or not to use "*.sty" mode {{{1
@@ -200,7 +204,7 @@ if !exists("g:tex_no_math")
endif
" Try to flag {} and () mismatches: {{{1
-if s:tex_fast =~ 'm'
+if s:tex_fast =~# 'm'
if !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
@@ -217,7 +221,7 @@ endif
if !s:tex_no_error
syn match texError "[}\])]"
endif
-if s:tex_fast =~ 'M'
+if s:tex_fast =~# 'M'
if !exists("g:tex_no_math")
if !s:tex_no_error
syn match texMathError "}" contained
@@ -260,14 +264,14 @@ 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'
+if s:tex_fast =~# 'm'
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
endif
" \documentclass, \documentstyle, \usepackage: {{{1
syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs
-if s:tex_fast =~ 'm'
+if s:tex_fast =~# 'm'
syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell
endif
@@ -281,7 +285,7 @@ syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatemen
syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
syn match texInputCurlies "[{}]" contained
-if s:tex_fast =~ 'm'
+if s:tex_fast =~# 'm'
syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment
endif
@@ -296,7 +300,7 @@ syn match texTypeStyle "\\sc\>"
syn match texTypeStyle "\\tt\>"
" Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1
-if s:tex_conceal !~ 'b'
+if s:tex_conceal !~# 'b'
syn match texTypeStyle "\\textbf\>"
syn match texTypeStyle "\\textit\>"
endif
@@ -349,7 +353,7 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=
syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
" Sections, subsections, etc: {{{1
-if s:tex_fast =~ 'p'
+if s:tex_fast =~# 'p'
if !s:tex_nospell
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
@@ -376,8 +380,8 @@ if s:tex_fast =~ 'p'
endif
" particular support for bold and italic {{{1
-if s:tex_fast =~ 'b'
- if s:tex_conceal =~ 'b'
+if s:tex_fast =~# 'b'
+ if s:tex_conceal =~# 'b'
if !exists("g:tex_nospell") || !g:tex_nospell
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
@@ -414,7 +418,7 @@ if !exists("g:tex_no_math")
let foldcmd= ""
endif
exe "syn cluster texMathZones add=".grpname
- if s:tex_fast =~ 'M'
+ if s:tex_fast =~# 'M'
exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
@@ -424,7 +428,7 @@ if !exists("g:tex_no_math")
let grpname = "texMathZone".a:sfx.'S'
let syncname = "texSyncMathZone".a:sfx.'S'
exe "syn cluster texMathZones add=".grpname
- if s:tex_fast =~ 'M'
+ if s:tex_fast =~# 'M'
exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
@@ -448,8 +452,8 @@ if !exists("g:tex_no_math")
call TexNewMathZone("L","xxalignat",0)
" Inline Math Zones: {{{2
- if s:tex_fast =~ 'M'
- if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd'
+ if s:tex_fast =~# 'M'
+ if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd'
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
@@ -466,7 +470,7 @@ if !exists("g:tex_no_math")
syn match texMathOper "[_^=]" contained
" Text Inside Math Zones: {{{2
- if s:tex_fast =~ 'M'
+ if s:tex_fast =~# 'M'
if !exists("g:tex_nospell") || !g:tex_nospell
syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell
else
@@ -476,7 +480,7 @@ if !exists("g:tex_no_math")
" \left..something.. and \right..something.. support: {{{2
syn match texMathDelimBad contained "\S"
- if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm'
+ if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm'
syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
let s:texMathDelimList=[
@@ -541,7 +545,7 @@ if !exists("g:tex_no_math")
syn match texOnlyMath "[_^]"
endif
syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S"
-if s:tex_conceal !~ 'S'
+if s:tex_conceal !~# 'S'
syn match texSpecialChar '\\glq\>' contained conceal cchar=‚
syn match texSpecialChar '\\grq\>' contained conceal cchar=‘
syn match texSpecialChar '\\glqq\>' contained conceal cchar=„
@@ -568,13 +572,13 @@ else
" 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'
+ if s:tex_fast =~# 'c'
TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup
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'
+ if s:tex_fast =~# 'c'
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
endif
endif
@@ -583,7 +587,7 @@ endif
" Separate lines used for verb` and verb# so that the end conditions {{{1
" will appropriately terminate.
" If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there.
-if s:tex_fast =~ 'v'
+if s:tex_fast =~# 'v'
if exists("g:tex_verbspell") && g:tex_verbspell
syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
" listings package:
@@ -614,7 +618,7 @@ if s:tex_fast =~ 'v'
endif
" Tex Reference Zones: {{{1
-if s:tex_fast =~ 'r'
+if s:tex_fast =~# 'r'
syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
@@ -628,13 +632,13 @@ syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
" Handle newcommand, newenvironment : {{{1
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
-if s:tex_fast =~ 'V'
+if s:tex_fast =~# 'V'
syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup
endif
syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl
-if s:tex_fast =~ 'V'
+if s:tex_fast =~# 'V'
syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl
syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup
syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup
@@ -660,11 +664,11 @@ syn match texString "\(``\|''\|,,\)"
" makeatletter -- makeatother sections
if !s:tex_no_error
- if s:tex_fast =~ 'S'
+ if s:tex_fast =~# 'S'
syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained
endif
syn match texStyleStatement "\\[a-zA-Z@]\+" contained
- if s:tex_fast =~ 'S'
+ if s:tex_fast =~# 'S'
syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained
syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained
endif
@@ -675,7 +679,7 @@ if has("conceal") && &enc == 'utf-8'
" Math Symbols {{{2
" (many of these symbols were contributed by Björn Winckler)
- if s:tex_conceal =~ 'm'
+ if s:tex_conceal =~# 'm'
let s:texMathList=[
\ ['|' , '‖'],
\ ['aleph' , 'ℵ'],
@@ -956,7 +960,7 @@ if has("conceal") && &enc == 'utf-8'
" \ ['uminus' , 'X']
" \ ['uplus' , 'X']
for texmath in s:texMathList
- if texmath[0] =~ '\w$'
+ if texmath[0] =~# '\w$'
exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
else
exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1]
@@ -995,7 +999,7 @@ if has("conceal") && &enc == 'utf-8'
endif
" Greek {{{2
- if s:tex_conceal =~ 'g'
+ if s:tex_conceal =~# 'g'
fun! s:Greek(group,pat,cchar)
exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar
endfun
@@ -1042,14 +1046,14 @@ if has("conceal") && &enc == 'utf-8'
endif
" Superscripts/Subscripts {{{2
- if s:tex_conceal =~ 's'
- if s:tex_fast =~ 's'
+ if s:tex_conceal =~# 's'
+ if s:tex_fast =~# 's'
syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
endif
" s:SuperSub:
fun! s:SuperSub(group,leader,pat,cchar)
- if a:pat =~ '^\\' || (a:leader == '\^' && a:pat =~ g:tex_superscripts) || (a:leader == '_' && a:pat =~ g:tex_subscripts)
+ if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s:tex_subscripts)
" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">")
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
@@ -1154,7 +1158,7 @@ if has("conceal") && &enc == 'utf-8'
endif
" Accented characters: {{{2
- if s:tex_conceal =~ 'a'
+ if s:tex_conceal =~# 'a'
if b:tex_stylish
syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
@@ -1169,7 +1173,7 @@ if has("conceal") && &enc == 'utf-8'
let i= i + 1
continue
endif
- if accent =~ '\a'
+ if accent =~# '\a'
exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i}
else
exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i}
diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim
index 916bd9635d..32503823ee 100644
--- a/runtime/syntax/vhdl.vim
+++ b/runtime/syntax/vhdl.vim
@@ -1,14 +1,10 @@
" Vim syntax file
-" Language: VHDL
-" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
+" Language: VHDL [VHSIC (Very High Speed Integrated Circuit) Hardware Description Language]
+" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
-" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
-" Last Changed: 2015 Dec 4 by Daniel Kho
+" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
+" Last Changed: 2016 Mar 05 by Daniel Kho
-" VHSIC (Very High Speed Integrated Circuit) Hardware Description Language
-
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
@@ -56,17 +52,40 @@ syn keyword vhdlStatement note warning error failure
syn match vhdlStatement "\<\(if\|else\)\>"
syn match vhdlError "\<else\s\+if\>"
-" Predefined VHDL types
-syn keyword vhdlType bit bit_vector
-syn keyword vhdlType character boolean integer real time
-syn keyword vhdlType boolean_vector integer_vector real_vector time_vector
-syn keyword vhdlType string severity_level
-" Predefined standard ieee VHDL types
-syn keyword vhdlType positive natural signed unsigned
-syn keyword vhdlType unresolved_signed unresolved_unsigned u_signed u_unsigned
-syn keyword vhdlType line text
-syn keyword vhdlType std_logic std_logic_vector
-syn keyword vhdlType std_ulogic std_ulogic_vector
+" Types and type qualifiers
+" Predefined standard VHDL types
+syn match vhdlType "\<bit\>\'\="
+syn match vhdlType "\<boolean\>\'\="
+syn match vhdlType "\<natural\>\'\="
+syn match vhdlType "\<positive\>\'\="
+syn match vhdlType "\<integer\>\'\="
+syn match vhdlType "\<real\>\'\="
+syn match vhdlType "\<time\>\'\="
+
+syn match vhdlType "\<bit_vector\>\'\="
+syn match vhdlType "\<boolean_vector\>\'\="
+syn match vhdlType "\<integer_vector\>\'\="
+syn match vhdlType "\<real_vector\>\'\="
+syn match vhdlType "\<time_vector\>\'\="
+
+syn match vhdlType "\<character\>\'\="
+syn match vhdlType "\<string\>\'\="
+"syn keyword vhdlType severity_level
+syn keyword vhdlType line
+syn keyword vhdlType text
+
+" Predefined standard IEEE VHDL types
+syn match vhdlType "\<std_ulogic\>\'\="
+syn match vhdlType "\<std_logic\>\'\="
+syn match vhdlType "\<std_ulogic_vector\>\'\="
+syn match vhdlType "\<std_logic_vector\>\'\="
+syn match vhdlType "\<unresolved_signed\>\'\="
+syn match vhdlType "\<unresolved_unsigned\>\'\="
+syn match vhdlType "\<u_signed\>\'\="
+syn match vhdlType "\<u_unsigned\>\'\="
+syn match vhdlType "\<signed\>\'\="
+syn match vhdlType "\<unsigned\>\'\="
+
" array attributes
syn match vhdlAttribute "\'high"
@@ -191,15 +210,23 @@ syn case ignore
syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell
+" Standard IEEE P1076.6 preprocessor directives (metacomments).
+syn match vhdlPreProc "/\*\s*rtl_synthesis\s\+\(on\|off\)\s*\*/"
+syn match vhdlPreProc "\(^\|\s\)--\s*rtl_synthesis\s\+\(on\|off\)\s*"
+syn match vhdlPreProc "/\*\s*rtl_syn\s\+\(on\|off\)\s*\*/"
+syn match vhdlPreProc "\(^\|\s\)--\s*rtl_syn\s\+\(on\|off\)\s*"
+
" Industry-standard directives. These are not standard VHDL, but are commonly
" used in the industry.
syn match vhdlPreProc "/\*\s*synthesis\s\+translate_\(on\|off\)\s*\*/"
"syn match vhdlPreProc "/\*\s*simulation\s\+translate_\(on\|off\)\s*\*/"
+syn match vhdlPreProc "/\*\s*pragma\s\+translate_\(on\|off\)\s*\*/"
syn match vhdlPreProc "/\*\s*pragma\s\+synthesis_\(on\|off\)\s*\*/"
syn match vhdlPreProc "/\*\s*synopsys\s\+translate_\(on\|off\)\s*\*/"
syn match vhdlPreProc "\(^\|\s\)--\s*synthesis\s\+translate_\(on\|off\)\s*"
"syn match vhdlPreProc "\(^\|\s\)--\s*simulation\s\+translate_\(on\|off\)\s*"
+syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+translate_\(on\|off\)\s*"
syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+synthesis_\(on\|off\)\s*"
syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*"
@@ -216,24 +243,24 @@ if version >= 508 || !exists("did_vhdl_syntax_inits")
else
command -nargs=+ HiLink hi def link <args>
endif
-
- 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 vhdlError Error
- HiLink vhdlAttribute Special
- HiLink vhdlPreProc PreProc
-
+
+ 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 vhdlError Error
+ HiLink vhdlAttribute Special
+ HiLink vhdlPreProc PreProc
+
delcommand HiLink
endif
diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim
index 25d4cd4936..0d385a35d0 100644
--- a/runtime/syntax/zsh.vim
+++ b/runtime/syntax/zsh.vim
@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2016-01-25
+" Latest Revision: 2016-02-15
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -13,20 +13,29 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-setlocal iskeyword+=-
-setlocal foldmethod=syntax
+if v:version > 704 || (v:version == 704 && has("patch1142"))
+ syn iskeyword @,48-57,_,192-255,#,-
+else
+ setlocal iskeyword+=-
+endif
+if get(g:, 'zsh_fold_enable', 0)
+ setlocal foldmethod=syntax
+endif
syn keyword zshTodo contained TODO FIXME XXX NOTE
syn region zshComment oneline start='\%(^\|\s*\)#' end='$'
- \ contains=zshTodo,@Spell
+ \ contains=zshTodo,@Spell fold
+
+syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!'
+ \ contains=zshTodo,@Spell fold
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
syn match zshQuoted '\\.'
syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+
- \ contains=zshQuoted,@zshDerefs,@zshSubst
-syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+
+ \ contains=zshQuoted,@zshDerefs,@zshSubst fold
+syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold
" XXX: This should probably be more precise, but Zsh seems a bit confused about it itself
syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+
\ end=+'+ contains=zshQuoted
@@ -46,7 +55,7 @@ syn keyword zshException always
syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite
-syn match zshKSHFunction contained '\k\+'
+syn match zshKSHFunction contained '\w\S\+'
syn match zshFunction '^\s*\k\+\ze\s*()'
syn match zshOperator '||\|&&\|;\|&!\='
@@ -317,6 +326,8 @@ syn region zshMathSubst matchgroup=zshSubstDelim transparent
\ @zshDerefs,zshString keepend fold
syn region zshBrackets contained transparent start='{' skip='\\}'
\ end='}' fold
+syn region zshBrackets transparent start='{' skip='\\}'
+ \ end='}' contains=TOP fold
syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
\ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+