aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/aptconf.vim135
-rw-r--r--runtime/syntax/c.vim8
-rw-r--r--runtime/syntax/d.vim42
-rw-r--r--runtime/syntax/dcl.vim10
-rw-r--r--runtime/syntax/fortran.vim15
-rw-r--r--runtime/syntax/lisp.vim8
-rw-r--r--runtime/syntax/maple.vim10
-rw-r--r--runtime/syntax/messages.vim3
-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/rst.vim6
-rw-r--r--runtime/syntax/sh.vim39
-rw-r--r--runtime/syntax/sshconfig.vim99
-rw-r--r--runtime/syntax/sshdconfig.vim83
-rw-r--r--runtime/syntax/tex.vim80
-rw-r--r--runtime/syntax/vhdl.vim101
-rw-r--r--runtime/syntax/zsh.vim36
22 files changed, 670 insertions, 398 deletions
diff --git a/runtime/syntax/aptconf.vim b/runtime/syntax/aptconf.vim
index 0607ca10f5..7a31b2d15e 100644
--- a/runtime/syntax/aptconf.vim
+++ b/runtime/syntax/aptconf.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: APT config file
" Maintainer: Yann Amar <quidame@poivron.org>
-" Last Change: 2013 Apr 12
+" Last Change: 2015 Dec 22
" For version 5.x: Clear all syntax items
" For version 6.x and 7.x: Quit when a syntax file was already loaded
@@ -38,22 +38,22 @@ setlocal iskeyword+=/,-,.,_,+
" Incomplete keywords will be treated differently than completely bad strings:
syn keyword aptconfGroupIncomplete
- \ a[cquire] a[ptitude] d[ebtags] d[ebug] d[ir] d[pkg] d[select]
- \ o[rderlist] p[ackagemanager] p[kgcachegen] q[uiet] r[pm]
- \ u[nattended-upgrade]
+ \ a[cquire] a[dequate] a[ptitude] a[ptlistbugs] d[ebtags] d[ebug]
+ \ d[ir] d[pkg] d[select] o[rderlist] p[ackagemanager] p[kgcachegen]
+ \ q[uiet] r[pm] s[ynaptic] u[nattended-upgrade] w[hatmaps]
" Only the following keywords can be used at toplevel (to begin an option):
syn keyword aptconfGroup
- \ acquire apt aptitude debtags debug dir dpkg dselect
- \ orderlist packagemanager pkgcachegen quiet rpm
- \ unattended-upgrade
+ \ acquire adequate apt aptitude aptlistbugs debtags debug
+ \ dir dpkg dselect orderlist packagemanager pkgcachegen
+ \ quiet rpm synaptic unattended-upgrade whatmaps
" Possible options for each group:
" Acquire: {{{
syn keyword aptconfAcquire contained
- \ cdrom Check-Valid-Until CompressionTypes ForceHash ftp gpgv
- \ GzipIndexes http https Languages Max-ValidTime Min-ValidTime PDiffs
- \ Queue-Mode Retries Source-Symlinks
+ \ cdrom Check-Valid-Until CompressionTypes ForceHash ForceIPv4
+ \ ForceIPv6 ftp gpgv GzipIndexes http https Languages Max-ValidTime
+ \ Min-ValidTime PDiffs Queue-Mode Retries Source-Symlinks
syn keyword aptconfAcquireCDROM contained
\ AutoDetect CdromOnly Mount UMount
@@ -62,14 +62,15 @@ syn keyword aptconfAcquireCompressionTypes contained
\ bz2 lzma gz Order
syn keyword aptconfAcquireFTP contained
- \ Passive Proxy ProxyLogin Timeout
+ \ ForceExtended Passive Proxy ProxyLogin Timeout
syn keyword aptconfAcquireHTTP contained
\ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth
- \ Proxy Timeout User-Agent
+ \ Proxy ProxyAutoDetect Proxy-Auto-Detect Timeout User-Agent
syn keyword aptconfAcquireHTTPS contained
- \ CaInfo CaPath CrlFile IssuerCert SslCert SslForceVersion SslKey
+ \ AllowRedirect CaInfo CaPath CrlFile Dl-Limit IssuerCert Max-Age
+ \ No-Cache No-Store Proxy SslCert SslForceVersion SslKey Timeout
\ Verify-Host Verify-Peer
syn keyword aptconfAcquireMaxValidTime contained
@@ -83,14 +84,21 @@ syn cluster aptconfAcquire_ contains=aptconfAcquire,
\ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime,
\ aptconfAcquirePDiffs
" }}}
+" Adequate: {{{
+syn keyword aptconfAdequate contained
+ \ Enabled
+
+syn cluster aptconfAdequate_ contains=aptconfAdequate
+" }}}
" Apt: {{{
syn keyword aptconfApt contained
\ Architecture Architectures Archive Authentication AutoRemove
- \ Build-Essential Cache Cache-Grow Cache-Limit Cache-Start CDROM
- \ Changelogs Clean-Installed Compressor Default-Release
- \ Force-LoopBreak Get Ignore-Hold Immediate-Configure
+ \ Build-Essential Build-Profiles Cache Cache-Grow Cache-Limit
+ \ Cache-Start CDROM Changelogs Clean-Installed Compressor
+ \ Default-Release Force-LoopBreak Get Ignore-Hold Immediate-Configure
\ Install-Recommends Install-Suggests Keep-Fds List-Cleanup
- \ NeverAutoRemove Never-MarkAuto-Sections Periodic Status-Fd Update
+ \ Move-Autobit-Sections NeverAutoRemove Never-MarkAuto-Sections
+ \ Periodic Status-Fd Update VersionedKernelPackages
syn keyword aptconfAptAuthentication contained
\ TrustCDROM
@@ -124,11 +132,12 @@ syn keyword aptconfAptGet contained
syn keyword aptconfAptPeriodic contained
\ AutocleanInterval BackupArchiveInterval BackupLevel
- \ Download-Upgradeable-Packages MaxAge MaxSize MinAge
- \ Unattended-Upgrade Update-Package-Lists Verbose
+ \ Download-Upgradeable-Packages Download-Upgradeable-Packages-Debdelta
+ \ Enable MaxAge MaxSize MinAge Unattended-Upgrade Update-Package-Lists
+ \ Verbose
syn keyword aptconfAptUpdate contained
- \ Pre-Invoke Post-Invoke Post-Invoke-Success
+ \ List-Refresh Pre-Invoke Post-Invoke Post-Invoke-Success
syn cluster aptconfApt_ contains=aptconfApt,
\ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache,
@@ -240,6 +249,12 @@ syn cluster aptconfAptitude_ contains=aptconfAptitude,
\ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles,
\ aptconfAptitudeUIStylesElements
" }}}
+" AptListbugs: {{{
+syn keyword aptconfAptListbugs contained
+ \ IgnoreRegexp Severities
+
+syn cluster aptconfAptListbugs_ contains=aptconfAptListbugs
+" }}}
" DebTags: {{{
syn keyword aptconfDebTags contained
\ Vocabulary
@@ -251,7 +266,8 @@ syn keyword aptconfDebug contained
\ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking
\ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM
\ pkgDPkgProgressReporting pkgInitialize pkgOrderList
- \ pkgPackageManager pkgPolicy pkgProblemResolver sourceList
+ \ pkgPackageManager pkgPolicy pkgProblemResolver RunScripts
+ \ sourceList
syn keyword aptconfDebugAcquire contained
\ cdrom Ftp gpgv Http Https netrc
@@ -295,7 +311,7 @@ syn keyword aptconfDirMedia contained
\ MountPath
syn keyword aptconfDirState contained
- \ cdroms extended_states Lists mirrors status
+ \ cdroms extended_states Lists mirrors preferences status
syn cluster aptconfDir_ contains=aptconfDir,
\ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc,
@@ -303,15 +319,16 @@ syn cluster aptconfDir_ contains=aptconfDir,
" }}}
" DPkg: {{{
syn keyword aptconfDPkg contained
- \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN MaxArgs
- \ MaxBytes NoTriggers options Pre-Install-Pkgs Pre-Invoke Post-Invoke
+ \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN
+ \ MaxArgBytes MaxArgs MaxBytes NoTriggers options
+ \ Pre-Install-Pkgs Pre-Invoke Post-Invoke
\ Run-Directory StopOnError Tools TriggersPending
syn keyword aptconfDPkgTools contained
- \ Options Version
+ \ adequate InfoFD Options Version
syn cluster aptconfDPkg_ contains=aptconfDPkg,
- \ aptconfDPkgOrderList,aptconfDPkgOrderListScore,aptconfDPkgTools
+ \ aptconfDPkgTools
" }}}
" DSelect: {{{
syn keyword aptconfDSelect contained
@@ -353,23 +370,59 @@ syn keyword aptconfRpm contained
syn cluster aptconfRpm_ contains=aptconfRpm
" }}}
-" Unattened Upgrade: {{{
+" Synaptic: {{{
+syn keyword aptconfSynaptic contained
+ \ AskQuitOnProceed AskRelated AutoCleanCache CleanCache DefaultDistro
+ \ delAction delHistory Download-Only ftpProxy ftpProxyPort httpProxy
+ \ httpProxyPort Install-Recommends LastSearchType Maximized noProxy
+ \ OneClickOnStatusActions ShowAllPkgInfoInMain showWelcomeDialog
+ \ ToolbarState undoStackSize update upgradeType useProxy UseStatusColors
+ \ UseTerminal useUserFont useUserTerminalFont ViewMode
+ \ availVerColumnPos availVerColumnVisible componentColumnPos
+ \ componentColumnVisible descrColumnPos descrColumnVisible
+ \ downloadSizeColumnPos downloadSizeColumnVisible hpanedPos
+ \ instVerColumnPos instVerColumnVisible instSizeColumnPos
+ \ instSizeColumnVisible nameColumnPos nameColumnVisible
+ \ sectionColumnPos sectionColumnVisible statusColumnPos
+ \ statusColumnVisible supportedColumnPos supportedColumnVisible
+ \ vpanedPos windowWidth windowHeight windowX windowY closeZvt
+ \ color-available color-available-locked color-broken color-downgrade
+ \ color-install color-installed-locked color-installed-outdated
+ \ color-installed-updated color-new color-purge color-reinstall
+ \ color-remove color-upgrade
+
+syn keyword aptconfSynapticUpdate contained
+ \ last type
+
+syn cluster aptconfSynaptic_ contains=aptconfSynaptic,
+ \ aptconfSynapticUpdate
+" }}}
+" Unattended Upgrade: {{{
syn keyword aptconfUnattendedUpgrade contained
- \ AutoFixInterruptedDpkg Automatic-Reboot InstallOnShutdown Mail
- \ MailOnlyOnError MinimalSteps Origins-Pattern Package-Blacklist
+ \ AutoFixInterruptedDpkg Automatic-Reboot Automatic-Reboot-Time
+ \ Automatic-Reboot-WithUsers InstallOnShutdown Mail MailOnlyOnError
+ \ MinimalSteps Origins-Pattern Package-Blacklist
\ Remove-Unused-Dependencies
syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
" }}}
+" Whatmaps: {{{
+syn keyword aptconfWhatmaps contained
+ \ Enable-Restart Security-Update-Origins
+
+syn cluster aptconfWhatmaps_ contains=aptconfWhatmaps
+" }}}
syn case match
" Now put all the keywords (and 'valid' options) in a single cluster:
syn cluster aptconfOptions contains=aptconfRegexpOpt,
- \ @aptconfAcquire_,@aptconfApt_,@aptconfAptitude_,@aptconfDebTags_,
- \ @aptconfDebug_,@aptconfDir_,@aptconfDPkg_,@aptconfDSelect_,
- \ @aptconfOrderList_,@aptconfPackageManager_,@aptconfPkgCacheGen_,
- \ @aptconfQuiet_,@aptconfRpm_,@aptconfUnattendedUpgrade_
+ \ @aptconfAcquire_,@aptconfAdequate_,@aptconfApt_,@aptconfAptitude_,
+ \ @aptconfAptListbugs_,@aptconfDebTags_,@aptconfDebug_,@aptconfDir_,
+ \ @aptconfDPkg_,@aptconfDSelect_,@aptconfOrderList_,
+ \ @aptconfPackageManager_,@aptconfPkgCacheGen_,@aptconfQuiet_,
+ \ @aptconfRpm_,@aptconfSynaptic_,@aptconfUnattendedUpgrade_,
+ \ @aptconfWhatmaps_
" Syntax:
syn match aptconfSemiColon ';'
@@ -382,8 +435,11 @@ syn region aptconfInclude matchgroup=aptconfOperator start='::' end='::\|\s'me=
" Basic Syntax Errors: XXX avoid to generate false positives !!!
"
-" * Invalid comment format (seems to not cause errors, but...):
-syn match aptconfAsError display '^#.*'
+" * Undocumented inline comment. Since it is currently largely used, and does
+" not seem to cause trouble ('apt-config dump' never complains when # is used
+" the same way than //) it has been moved to aptconfComment group. But it
+" still needs to be defined here (i.e. before #clear and #include directives)
+syn match aptconfComment '#.*' contains=@aptconfCommentSpecial
"
" * When a semicolon is missing after a double-quoted string:
" There are some cases (for example in the Dir group of options, but not only)
@@ -445,6 +501,8 @@ hi def link aptconfAcquireHTTPS aptconfOption
hi def link aptconfAcquireMaxValidTime aptconfOption
hi def link aptconfAcquirePDiffs aptconfOption
+hi def link aptconfAdequate aptconfOption
+
hi def link aptconfApt aptconfOption
hi def link aptconfAptAuthentication aptconfOption
hi def link aptconfAptAutoRemove aptconfOption
@@ -471,6 +529,8 @@ hi def link aptconfAptitudeUIKeyBindings aptconfOption
hi def link aptconfAptitudeUIStyles aptconfOption
hi def link aptconfAptitudeUIStylesElements aptconfOption
+hi def link aptconfAptListbugs aptconfOption
+
hi def link aptconfDebTags aptconfOption
hi def link aptconfDebug aptconfOption
@@ -504,8 +564,13 @@ hi def link aptconfQuiet aptconfOption
hi def link aptconfRpm aptconfOption
+hi def link aptconfSynaptic aptconfOption
+hi def link aptconfSynapticUpdate aptconfOption
+
hi def link aptconfUnattendedUpgrade aptconfOption
+hi def link aptconfWhatmaps aptconfOption
+
let b:current_syntax = "aptconf"
let &cpo = s:cpo_save
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index ac4909edba..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: 2015 Mar 05
+" 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
@@ -264,7 +268,7 @@ syn keyword cStorageClass static register auto volatile extern const
if exists("c_gnu")
syn keyword cStorageClass inline __attribute__
endif
-if !exists("c_no_c99")
+if !exists("c_no_c99") && s:ft !=# 'cpp'
syn keyword cStorageClass inline restrict
endif
if !exists("c_no_c11")
diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim
index 07a299fa55..8be9b9ff28 100644
--- a/runtime/syntax/d.vim
+++ b/runtime/syntax/d.vim
@@ -1,9 +1,9 @@
-" Vim syntax file for the D programming language (version 1.076 and 2.063).
+" Vim syntax file for the D programming language (version 1.076 and 2.069).
"
" Language: D
" Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com>
-" Last Change: 2013 October 5
-" Version: 0.26
+" Last Change: 2016 Feb 2
+" Version: 0.28
"
" Contributors:
" - Jason Mills: original Maintainer
@@ -15,6 +15,7 @@
" - Steven N. Oliver
" - Sohgo Takeuchi
" - Robert Clipsham
+" - Petar Kirov
"
" Please submit bugs/comments/suggestions to the github repo:
" https://github.com/JesseKPhillips/d.vim
@@ -114,17 +115,19 @@ syn keyword dTraitsIdentifier contained isIntegral isScalar isStaticArray
syn keyword dTraitsIdentifier contained isUnsigned isVirtualFunction
syn keyword dTraitsIdentifier contained isVirtualMethod isAbstractFunction
syn keyword dTraitsIdentifier contained isFinalFunction isStaticFunction
+syn keyword dTraitsIdentifier contained isOverrideFunction isTemplate
syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember
-syn keyword dTraitsIdentifier contained identifier getAttributes getMember
-syn keyword dTraitsIdentifier contained getOverloads getProtection
-syn keyword dTraitsIdentifier contained getVirtualFunctions
-syn keyword dTraitsIdentifier contained getVirtualMethods parent
-syn keyword dTraitsIdentifier contained classInstanceSize allMembers
+syn keyword dTraitsIdentifier contained identifier getAliasThis
+syn keyword dTraitsIdentifier contained getAttributes getFunctionAttributes getMember
+syn keyword dTraitsIdentifier contained getOverloads getPointerBitmap getProtection
+syn keyword dTraitsIdentifier contained getVirtualFunctions getVirtualIndex
+syn keyword dTraitsIdentifier contained getVirtualMethods getUnitTests
+syn keyword dTraitsIdentifier contained parent classInstanceSize allMembers
syn keyword dTraitsIdentifier contained derivedMembers isSame compiles
-syn keyword dPragmaIdentifier contained lib msg startaddress GNU_asm
-syn keyword dExternIdentifier contained Windows Pascal Java System D
+syn keyword dPragmaIdentifier contained inline lib mangle msg startaddress GNU_asm
+syn keyword dExternIdentifier contained C C++ D Windows Pascal System Objective-C
syn keyword dAttribute contained safe trusted system
-syn keyword dAttribute contained property disable
+syn keyword dAttribute contained property disable nogc
syn keyword dVersionIdentifier contained DigitalMars GNU LDC SDC D_NET
syn keyword dVersionIdentifier contained X86 X86_64 ARM PPC PPC64 IA64 MIPS MIPS64 Alpha
syn keyword dVersionIdentifier contained SPARC SPARC64 S390 S390X HPPA HPPA64 SH SH64
@@ -134,7 +137,7 @@ syn keyword dVersionIdentifier contained Cygwin MinGW
syn keyword dVersionIdentifier contained LittleEndian BigEndian
syn keyword dVersionIdentifier contained D_InlineAsm_X86 D_InlineAsm_X86_64
syn keyword dVersionIdentifier contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC
-syn keyword dVersionIdentifier contained unittest none all
+syn keyword dVersionIdentifier contained unittest assert none all
syn cluster dComment contains=dNestedComment,dBlockComment,dLineComment
@@ -168,10 +171,10 @@ syn match dExternal "\<extern\>"
syn match dExtern "\<extern\s*([_a-zA-Z][_a-zA-Z0-9\+]*\>"he=s+6 contains=dExternIdentifier
" Make import a region to prevent highlighting keywords
-syn region dImport start="import\_s" end=";" contains=dExternal,@dComment
+syn region dImport start="\<import\_s" end=";" contains=dExternal,@dComment
" Make module a region to prevent highlighting keywords
-syn region dImport start="module\_s" end=";" contains=dExternal,@dComment
+syn region dImport start="\<module\_s" end=";" contains=dExternal,@dComment
" dTokens is used by the token string highlighting
syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean
@@ -246,13 +249,17 @@ syn match dUnicode "\\u\d\{4\}"
" String.
"
-syn region dString start=+"+ end=+"[cwd]\=+ skip=+\\\\\|\\"+ contains=dEscSequence,@Spell
+syn match dFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
+syn match dFormat display "%%" contained
+
+syn region dString start=+"+ end=+"[cwd]\=+ skip=+\\\\\|\\"+ contains=dFormat,dEscSequence,@Spell
syn region dRawString start=+`+ end=+`[cwd]\=+ contains=@Spell
syn region dRawString start=+r"+ end=+"[cwd]\=+ contains=@Spell
syn region dHexString start=+x"+ end=+"[cwd]\=+ contains=@Spell
syn region dDelimString start=+q"\z(.\)+ end=+\z1"+ contains=@Spell
syn region dHereString start=+q"\z(\I\i*\)\n+ end=+^\z1"+ contains=@Spell
+
" Nesting delimited string contents
"
syn region dNestParenString start=+(+ end=+)+ contained transparent contains=dNestParenString,@Spell
@@ -276,8 +283,8 @@ syn cluster dTokens add=dString,dRawString,dHexString,dDelimString,dNestString
" Token strings
"
-syn region dNestTokenString start=+{+ end=+}+ contained contains=dNestTokenString,@dTokens
-syn region dTokenString matchgroup=dTokenStringBrack transparent start=+q{+ end=+}+ contains=dNestTokenString,@dTokens
+syn region dNestTokenString start=+{+ end=+}+ contained contains=dNestTokenString,@dTokens,dFormat
+syn region dTokenString matchgroup=dTokenStringBrack transparent start=+q{+ end=+}+ contains=dNestTokenString,@dTokens,dFormat
syn cluster dTokens add=dTokenString
@@ -357,6 +364,7 @@ hi def link dString String
hi def link dHexString String
hi def link dCharacter Character
hi def link dEscSequence SpecialChar
+hi def link dFormat SpecialChar
hi def link dSpecialCharError Error
hi def link dOctalError Error
hi def link dOperator Operator
diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim
index 37bf38fe11..b08adec31d 100644
--- a/runtime/syntax/dcl.vim
+++ b/runtime/syntax/dcl.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: DCL (Digital Command Language - vms)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Oct 23, 2014
-" Version: 7
+" Last Change: Jan 20, 2016
+" Version: 8
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL
" For version 5.x: Clear all syntax items
@@ -13,10 +13,10 @@ elseif exists("b:current_syntax")
finish
endif
-if version < 600
- set iskeyword=$,@,48-57,_
-else
+if !has("patch-7.4.1141")
setlocal iskeyword=$,@,48-57,_
+else
+ syn iskeyword $,@,48-57,_
endif
syn case ignore
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/lisp.vim b/runtime/syntax/lisp.vim
index 2528f4f9b1..f496398d50 100644
--- a/runtime/syntax/lisp.vim
+++ b/runtime/syntax/lisp.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Lisp
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Oct 06, 2014
-" Version: 23
+" Last Change: Jan 20, 2016
+" Version: 24
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
@@ -16,8 +16,10 @@ endif
if exists("g:lisp_isk")
exe "setl isk=".g:lisp_isk
-else
+elseif !has("patch-7.4.1141")
setl isk=38,42,43,45,47-58,60-62,64-90,97-122,_
+else
+ syn iskeyword 38,42,43,45,47-58,60-62,64-90,97-122,_
endif
if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp")
diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim
index 9c94643836..9a4db26dd8 100644
--- a/runtime/syntax/maple.vim
+++ b/runtime/syntax/maple.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Maple V (based on release 4)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Oct 23, 2014
-" Version: 11
+" Last Change: Jan 20, 2016
+" Version: 12
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE
"
" Package Function Selection: {{{1
@@ -30,10 +30,10 @@ elseif exists("b:current_syntax")
endif
" Iskeyword Effects: {{{1
-if version < 600
- set iskeyword=$,48-57,_,a-z,@-Z
+if !has("patch-7.4.1141")
+ setl isk=$,48-57,_,a-z,@-Z
else
- setlocal iskeyword=$,48-57,_,a-z,@-Z
+ syn iskeyword $,48-57,_,a-z,@-Z
endif
" Package Selection: {{{1
diff --git a/runtime/syntax/messages.vim b/runtime/syntax/messages.vim
index 4648e94c13..c22e4e8d0c 100644
--- a/runtime/syntax/messages.vim
+++ b/runtime/syntax/messages.vim
@@ -3,6 +3,7 @@
" Maintainer: Yakov Lerner <iler.ml@gmail.com>
" Latest Revision: 2008-06-29
" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega
+" 2016 Jan 19: messagesDate changed by Bram
if exists("b:current_syntax")
finish
@@ -13,7 +14,7 @@ set cpo&vim
syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339
-syn match messagesDate contained display '\a\a\a [ 0-9]\d *'
+syn match messagesDate contained display '[[:lower:][:upper:]][[:lower:][:upper:]][[:lower:][:upper:]] [ 0-9]\d *'
\ nextgroup=messagesHour
syn match messagesHour contained display '\d\d:\d\d:\d\d\s*'
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/rst.vim b/runtime/syntax/rst.vim
index 8b17104be4..b3c89f8352 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -2,7 +2,7 @@
" Language: reStructuredText documentation format
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2015-09-07
+" Latest Revision: 2016-01-05
if exists("b:current_syntax")
finish
@@ -13,8 +13,6 @@ set cpo&vim
syn case ignore
-syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$"
-
syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/
syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis,
@@ -123,6 +121,8 @@ call s:DefineInlineMarkup('InlineLiteral', '``', "", '``')
call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}')
call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`')
+syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$"
+
" TODO: Can’t remember why these two can’t be defined like the ones above.
execute 'syn match rstFootnoteReference contains=@NoSpell' .
\ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+'
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index efe0bcb461..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: Nov 09, 2015
-" Version: 142
+" 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)
@@ -85,6 +85,11 @@ if g:sh_fold_enabled && &fdm == "manual"
setl fdm=syntax
endif
+" set up the syntax-highlighting iskeyword
+if has("patch-7.4.1141")
+ exe "syn iskeyword ".&iskeyword.",-"
+endif
+
" Set up folding commands for shell {{{1
" =================================
if s:sh_fold_functions
@@ -119,7 +124,7 @@ syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSu
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
-syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
+syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
@@ -180,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
@@ -312,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
@@ -493,6 +499,11 @@ if exists("b:is_bash")
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList
+
+ " bash : ${parameter/#substring/replacement}
+ syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft
+ syn region shDerefPSRleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
+ syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}'
endif
" Arithmetic Parenthesized Expressions: {{{1
@@ -528,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\>"
@@ -563,6 +581,7 @@ hi def link shColon shComment
hi def link shDerefOp shOperator
hi def link shDerefPOL shDerefOp
hi def link shDerefPPS shDerefOp
+hi def link shDerefPSR shDerefOp
hi def link shDeref shShellVariables
hi def link shDerefDelim shOperator
hi def link shDerefSimple shDeref
diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim
index 479277e17f..44b3c67a96 100644
--- a/runtime/syntax/sshconfig.vim
+++ b/runtime/syntax/sshconfig.vim
@@ -2,9 +2,10 @@
" Language: OpenSSH client configuration file (ssh_config)
" Author: David Necas (Yeti)
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
-" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
-" Last Change: 2015 Dec 3
-" SSH Version: 7.0
+" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
+" Contributor: Karsten Hopp <karsten@redhat.com>
+" Last Change: 2016 Mar 1
+" SSH Version: 7.2
"
" Setup
@@ -39,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
@@ -69,19 +101,22 @@ syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
syn keyword sshconfigAddressFamily inet inet6
-syn match sshconfigIPQoS "af1[1234]"
-syn match sshconfigIPQoS "af2[23]"
+syn match sshconfigIPQoS "af1[123]"
+syn match sshconfigIPQoS "af2[123]"
syn match sshconfigIPQoS "af3[123]"
syn match sshconfigIPQoS "af4[123]"
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
@@ -106,6 +141,11 @@ syn keyword sshconfigMatch canonical exec host originalhost user localuser all
syn keyword sshconfigKeyword AddressFamily
syn keyword sshconfigKeyword BatchMode
syn keyword sshconfigKeyword BindAddress
+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
@@ -145,6 +185,8 @@ syn keyword sshconfigKeyword HostbasedKeyTypes
syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword IdentitiesOnly
syn keyword sshconfigKeyword IdentityFile
+syn keyword sshconfigKeyword IgnoreUnknown
+syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword KbdInteractiveAuthentication
syn keyword sshconfigKeyword KbdInteractiveDevices
syn keyword sshconfigKeyword KexAlgorithms
@@ -182,6 +224,7 @@ syn keyword sshconfigKeyword UseBlacklistedKeys
syn keyword sshconfigKeyword UsePrivilegedPort
syn keyword sshconfigKeyword User
syn keyword sshconfigKeyword UserKnownHostsFile
+syn keyword sshconfigKeyword UseRoaming
syn keyword sshconfigKeyword VerifyHostKeyDNS
syn keyword sshconfigKeyword VisualHostKey
syn keyword sshconfigKeyword XAuthLocation
@@ -204,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 ac90a80aa5..6b7b98d893 100644
--- a/runtime/syntax/sshdconfig.vim
+++ b/runtime/syntax/sshdconfig.vim
@@ -4,9 +4,10 @@
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Contributor: Thilo Six
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
+" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
-" Last Change: 2015 Dec 3
-" SSH Version: 7.0
+" Last Change: 2016 Mar 1
+" SSH Version: 7.2
"
" Setup
@@ -46,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
@@ -65,18 +106,21 @@ syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
syn keyword sshdconfigCompression delayed
-syn match sshdconfigIPQoS "af1[1234]"
-syn match sshdconfigIPQoS "af2[23]"
+syn match sshdconfigIPQoS "af1[123]"
+syn match sshdconfigIPQoS "af2[123]"
syn match sshdconfigIPQoS "af3[123]"
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
@@ -109,6 +153,7 @@ syn keyword sshdconfigKeyword AllowGroups
syn keyword sshdconfigKeyword AllowStreamLocalForwarding
syn keyword sshdconfigKeyword AllowTcpForwarding
syn keyword sshdconfigKeyword AllowUsers
+syn keyword sshdconfigKeyword AuthenticationMethods
syn keyword sshdconfigKeyword AuthorizedKeysFile
syn keyword sshdconfigKeyword AuthorizedKeysCommand
syn keyword sshdconfigKeyword AuthorizedKeysCommandUser
@@ -132,6 +177,7 @@ syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck
syn keyword sshdconfigKeyword GatewayPorts
syn keyword sshdconfigKeyword HostCertificate
syn keyword sshdconfigKeyword HostKey
+syn keyword sshdconfigKeyword HostKeyAgent
syn keyword sshdconfigKeyword HostKeyAlgorithms
syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes
syn keyword sshdconfigKeyword HostbasedAuthentication
@@ -212,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 d31e14bed0..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: Oct 20, 2015
-" Version: 90
+" 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
@@ -129,8 +133,10 @@ endif
" g:tex_isk
if exists("g:tex_isk")
exe "setlocal isk=".g:tex_isk
+elseif !has("patch-7.4.1141")
+ setl isk=48-57,a-z,A-Z,192-255
else
- setlocal isk=48-57,a-z,A-Z,192-255
+ syn iskeyword 48-57,a-z,A-Z,192-255
endif
if b:tex_stylish
setlocal isk+=@-@
@@ -198,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
@@ -215,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
@@ -258,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
@@ -279,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
@@ -294,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
@@ -347,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
@@ -374,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
@@ -412,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*}"'
@@ -422,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*}"'
@@ -446,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
@@ -464,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
@@ -474,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=[
@@ -539,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=„
@@ -566,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
@@ -581,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:
@@ -612,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
@@ -626,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
@@ -658,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
@@ -673,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' , 'ℵ'],
@@ -954,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]
@@ -993,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
@@ -1040,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'
@@ -1152,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
@@ -1167,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 162577669f..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: 2015-12-25
+" Latest Revision: 2016-02-15
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -13,19 +13,29 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-setlocal iskeyword+=-
+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
@@ -45,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 '||\|&&\|;\|&!\='
@@ -307,19 +317,21 @@ syn match zshNumber '[+-]\=\d\+\.\d\+\>'
" TODO: $[...] is the same as $((...)), so add that as well.
syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst
syn region zshSubst matchgroup=zshSubstDelim transparent
- \ start='\$(' skip='\\)' end=')' contains=TOP
-syn region zshParentheses transparent start='(' skip='\\)' end=')'
+ \ start='\$(' skip='\\)' end=')' contains=TOP fold
+syn region zshParentheses transparent start='(' skip='\\)' end=')' fold
syn region zshMathSubst matchgroup=zshSubstDelim transparent
\ start='\$((' skip='\\)'
\ matchgroup=zshSubstDelim end='))'
\ contains=zshParentheses,@zshSubst,zshNumber,
- \ @zshDerefs,zshString keepend
+ \ @zshDerefs,zshString keepend fold
syn region zshBrackets contained transparent start='{' skip='\\}'
- \ end='}'
+ \ 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
+ \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
- \ end=+`+ contains=TOP,zshOldSubst
+ \ end=+`+ contains=TOP,zshOldSubst fold
syn sync minlines=50 maxlines=90
syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'