aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/2html.vim8
-rw-r--r--runtime/syntax/bzl.vim16
-rw-r--r--runtime/syntax/cmake.vim16
-rw-r--r--runtime/syntax/dnsmasq.vim9
-rw-r--r--runtime/syntax/gnuplot.vim33
-rw-r--r--runtime/syntax/python.vim6
-rw-r--r--runtime/syntax/rst.vim4
-rw-r--r--runtime/syntax/screen.vim20
-rw-r--r--runtime/syntax/sh.vim51
-rw-r--r--runtime/syntax/systemd.vim8
-rw-r--r--runtime/syntax/vhdl.vim82
11 files changed, 173 insertions, 80 deletions
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim
index 187b1be1b0..ddc7819be2 100644
--- a/runtime/syntax/2html.vim
+++ b/runtime/syntax/2html.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2013 Jul 08
+" Last Change: 2015 Sep 08
"
" Additional contributors:
"
@@ -26,7 +26,11 @@ let s:end=line('$')
" Font
if exists("g:html_font")
- let s:htmlfont = "'". g:html_font . "', monospace"
+ if type(g:html_font) == type([])
+ let s:htmlfont = "'". join(g:html_font,"','") . "', monospace"
+ else
+ let s:htmlfont = "'". g:html_font . "', monospace"
+ endif
else
let s:htmlfont = "monospace"
endif
diff --git a/runtime/syntax/bzl.vim b/runtime/syntax/bzl.vim
new file mode 100644
index 0000000000..b0ee9454ff
--- /dev/null
+++ b/runtime/syntax/bzl.vim
@@ -0,0 +1,16 @@
+" Vim syntax file
+" Language: Bazel (http://bazel.io)
+" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
+" Last Change: 2015 Aug 11
+
+if exists('b:current_syntax')
+ finish
+endif
+
+
+runtime! syntax/python.vim
+
+let b:current_syntax = 'bzl'
+
+syn region bzlRule start='^\w\+($' end='^)\n*' transparent fold
+syn region bzlList start='\[' end='\]' transparent fold
diff --git a/runtime/syntax/cmake.vim b/runtime/syntax/cmake.vim
index 8e54d511e0..68b2198de7 100644
--- a/runtime/syntax/cmake.vim
+++ b/runtime/syntax/cmake.vim
@@ -2,10 +2,10 @@
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile: cmake-syntax.vim,v $
" Language: CMake
-" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
-" Last Change: 2012 Jun 01
-" (Dominique Pelle added @Spell)
+" Former Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
+" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
+" Last Change: 2015 Sep 29
" Version: $Revision: 1.10 $
"
" Licence: The CMake license applies to this file. See
@@ -31,9 +31,9 @@ syn region cmakeVariableValue start=/\${/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
syn region cmakeEnvironment start=/\$ENV{/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
-syn region cmakeString start=/"/ end=/"/
+syn region cmakeString start=/"/ end=/"/
\ contains=CONTAINED,cmakeTodo,cmakeOperators
-syn region cmakeArguments start=/(/ end=/)/
+syn region cmakeArguments start=/(/ end=/)/
\ contains=ALLBUT,cmakeArguments,cmakeTodo
syn keyword cmakeSystemVariables
\ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90
@@ -44,11 +44,11 @@ syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_
\ nextgroup=cmakeArguments
" The keywords are generated as: cmake --help-command-list | tr "\n" " "
-syn keyword cmakeStatement
+syn keyword cmakeStatement
\ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN UNSET USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE
\ nextgroup=cmakeArguments
-syn keyword cmakeTodo
- \ TODO FIXME XXX
+syn keyword cmakeTodo
+ \ TODO FIXME XXX
\ contained
" Define the default highlighting.
diff --git a/runtime/syntax/dnsmasq.vim b/runtime/syntax/dnsmasq.vim
index 2a31aed77f..9fa32077b6 100644
--- a/runtime/syntax/dnsmasq.vim
+++ b/runtime/syntax/dnsmasq.vim
@@ -4,8 +4,8 @@
" :3s+-foo++g
" Description: highlight dnsmasq configuration files
" File: runtime/syntax/dnsmasq.vim
-" Version: 2.70
-" Last Change: 2014 Apr 30
+" Version: 2.76
+" Last Change: 2015 Sep 27
" Modeline: vim: ts=8:sw=2:sts=2:
"
" License: VIM License
@@ -131,10 +131,12 @@ syn match DnsmasqKeyword "^\s*dhcp-sequential-ip\>"
syn match DnsmasqKeyword "^\s*dhcp-subscrid\>"
syn match DnsmasqKeyword "^\s*dhcp-userclass\>"
syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>"
+syn match DnsmasqKeyword "^\s*dhcp-hostsdir\>"
syn match DnsmasqKeyword "^\s*dns-rr\>"
syn match DnsmasqKeyword "^\s*dnssec\>"
syn match DnsmasqKeyword "^\s*dnssec-check-unsigned\>"
syn match DnsmasqKeyword "^\s*dnssec-no-timecheck\>"
+syn match DnsmasqKeyword "^\s*dnssec-timestamp\>"
syn match DnsmasqKeyword "^\s*dns-forward-max\>"
syn match DnsmasqKeyword "^\s*domain\>"
syn match DnsmasqKeyword "^\s*domain-needed\>"
@@ -150,6 +152,7 @@ syn match DnsmasqKeyword "^\s*host-record\>"
syn match DnsmasqKeyword "^\s*interface\>"
syn match DnsmasqKeyword "^\s*interface-name\>"
syn match DnsmasqKeyword "^\s*ipset\>"
+syn match DnsmasqKeyword "^\s*ignore-address\>"
syn match DnsmasqKeyword "^\s*keep-in-foreground\>"
syn match DnsmasqKeyword "^\s*leasefile-ro\>"
syn match DnsmasqKeyword "^\s*listen-address\>"
@@ -164,6 +167,7 @@ syn match DnsmasqKeyword "^\s*log-facility\>"
syn match DnsmasqKeyword "^\s*log-queries\>"
syn match DnsmasqKeyword "^\s*max-ttl\>"
syn match DnsmasqKeyword "^\s*max-cache-ttl\>"
+syn match DnsmasqKeyword "^\s*min-cache-ttl\>"
syn match DnsmasqKeyword "^\s*min-port\>"
syn match DnsmasqKeyword "^\s*mx-host\>"
syn match DnsmasqKeyword "^\s*mx-target\>"
@@ -204,6 +208,7 @@ syn match DnsmasqKeyword "^\s*test\>"
syn match DnsmasqKeyword "^\s*tftp-max\>"
syn match DnsmasqKeyword "^\s*tftp-lowercase\>"
syn match DnsmasqKeyword "^\s*tftp-no-blocksize\>"
+syn match DnsmasqKeyword "^\s*tftp-no-fail\>"
syn match DnsmasqKeyword "^\s*tftp-port-range\>"
syn match DnsmasqKeyword "^\s*tftp-root\>"
syn match DnsmasqKeyword "^\s*tftp-secure\>"
diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim
index 03d813c99f..d85932d401 100644
--- a/runtime/syntax/gnuplot.vim
+++ b/runtime/syntax/gnuplot.vim
@@ -1,8 +1,9 @@
" Vim syntax file
" Language: gnuplot 4.7.0
-" Maintainer: Andrew Rasmussen andyras@users.sourceforge.net
+" Maintainer: Josh Wainwright <wainwright DOT ja AT gmail DOT com>
+" Last Maintainer: Andrew Rasmussen andyras@users.sourceforge.net
" Original Maintainer: John Hoelzel johnh51@users.sourceforge.net
-" Last Change: 2014-02-24
+" Last Change: 2015-08-25
" Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot
" URL: http://www.vim.org/scripts/script.php?script_id=4873
" Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
@@ -364,18 +365,18 @@ syn keyword gnuplotKeyword samples
" set size
syn keyword gnuplotKeyword size square nosquare ratio noratio
" set style
-syn keyword gnuplotKeyword style function data noborder rectangle arrow
-syn keyword gnuplotKeyword default nohead head heads size filled empty
-syn keyword gnuplotKeyword nofilled front back boxplot range fraction
-syn keyword gnuplotKeyword outliers nooutliers pointtype candlesticks
-syn keyword gnuplotKeyword separation labels off auto x x2 sorted unsorted
-syn keyword gnuplotKeyword fill empty transparent solid pattern border
-syn keyword gnuplotKeyword increment userstyles financebars line default
-syn keyword gnuplotKeyword linetype lt linecolor lc linewidth lw pointtype
-syn keyword gnuplotKeyword pt pointsize ps pointinterval pi palette circle
-syn keyword gnuplotKeyword radius graph screen wedge nowedge ellipse size
-syn keyword gnuplotKeyword units xx xy yy histogram line textbox opaque
-syn keyword gnuplotKeyword border noborder
+syn keyword gnuplotKeyword style arrow auto back border boxplot
+syn keyword gnuplotKeyword candlesticks circle clustered columnstacked data
+syn keyword gnuplotKeyword default ellipse empty fill[ed] financebars
+syn keyword gnuplotKeyword fraction front function gap graph head[s]
+syn keyword gnuplotKeyword histogram increment labels lc line linecolor
+syn keyword gnuplotKeyword linetype linewidth lt lw noborder nofilled
+syn keyword gnuplotKeyword nohead nooutliers nowedge off opaque outliers
+syn keyword gnuplotKeyword palette pattern pi pointinterval pointsize
+syn keyword gnuplotKeyword pointtype ps pt radius range rectangle
+syn keyword gnuplotKeyword rowstacked screen separation size solid sorted
+syn keyword gnuplotKeyword textbox transparent units unsorted userstyles
+syn keyword gnuplotKeyword wedge x x2 xx xy yy
" set surface
syn keyword gnuplotKeyword surface implicit explicit
" set table
@@ -496,8 +497,8 @@ syn keyword gnuplotTodo contained TODO FIXME XXX
syn keyword gnuplotStatement cd call clear evaluate exit fit help history
syn keyword gnuplotStatement load lower pause plot p print pwd quit raise
syn keyword gnuplotStatement refresh replot rep reread reset save set show
-syn keyword gnuplotStatement shell splot spstats system test undefine unset
-syn keyword gnuplotStatement update
+syn keyword gnuplotStatement shell splot spstats stats system test undefine
+syn keyword gnuplotStatement unset update
" ---- Define the default highlighting ---- "
" For version 5.7 and earlier: only when not done already
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index f4369df131..78d35e4c15 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 Jul 14
+" Last Change: 2015 Sep 15
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -70,6 +70,7 @@ set cpo&vim
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
" - 'print' is a built-in in Python 3 and will be highlighted as
" built-in below (use 'from __future__ import print_function' in 2)
+" - async and await were added in Python 3.5 and are soft keywords.
"
syn keyword pythonStatement False, None, True
syn keyword pythonStatement as assert break continue del exec global
@@ -80,6 +81,7 @@ syn keyword pythonRepeat for while
syn keyword pythonOperator and in is not or
syn keyword pythonException except finally raise try
syn keyword pythonInclude from import
+syn keyword pythonAsync async await
" Decorators (new in Python 2.4)
syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite
@@ -230,6 +232,7 @@ if !exists("python_no_exception_highlight")
syn keyword pythonExceptions FileNotFoundError InterruptedError
syn keyword pythonExceptions IsADirectoryError NotADirectoryError
syn keyword pythonExceptions PermissionError ProcessLookupError
+ syn keyword pythonExceptions RecursionError StopAsyncIteration
syn keyword pythonExceptions TimeoutError
" builtin exceptions deprecated/removed in Python 3
syn keyword pythonExceptions IOError VMSError WindowsError
@@ -286,6 +289,7 @@ if version >= 508 || !exists("did_python_syn_inits")
HiLink pythonOperator Operator
HiLink pythonException Exception
HiLink pythonInclude Include
+ HiLink pythonAsync Statement
HiLink pythonDecorator Define
HiLink pythonFunction Function
HiLink pythonComment Comment
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index c1f25699e7..8b17104be4 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: 2014-10-03
+" Latest Revision: 2015-09-07
if exists("b:current_syntax")
finish
@@ -81,7 +81,7 @@ syn region rstHyperlinkTarget matchgroup=rstDirective
execute 'syn region rstExDirective contained matchgroup=rstDirective' .
\ ' start=+' . s:ReferenceName . '::\_s+' .
\ ' skip=+^$+' .
- \ ' end=+^\s\@!+ contains=@rstCruft'
+ \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock'
execute 'syn match rstSubstitutionDefinition contained' .
\ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives'
diff --git a/runtime/syntax/screen.vim b/runtime/syntax/screen.vim
index 71b3d3efba..d576d29b7a 100644
--- a/runtime/syntax/screen.vim
+++ b/runtime/syntax/screen.vim
@@ -1,7 +1,8 @@
" Vim syntax file
-" Language: screen(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2010-01-03
+" Language: screen(1) configuration file
+" Maintainer: Dmitri Vereshchagin <dmitri.vereshchagin@gmail.com>
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2015-09-24
if exists("b:current_syntax")
finish
@@ -76,12 +77,16 @@ syn keyword screenCommands
\ break
\ breaktype
\ bufferfile
+ \ bumpleft
+ \ bumpright
\ c1
\ caption
\ chacl
\ charset
\ chdir
+ \ cjkwidth
\ clear
+ \ collapse
\ colon
\ command
\ compacthist
@@ -104,6 +109,7 @@ syn keyword screenCommands
\ deflogin
\ defmode
\ defmonitor
+ \ defmousetrack
\ defnonblock
\ defobuflimit
\ defscrollback
@@ -113,6 +119,7 @@ syn keyword screenCommands
\ defutf8
\ defwrap
\ defwritelock
+ \ defzombie
\ detach
\ digraph
\ dinfo
@@ -126,7 +133,9 @@ syn keyword screenCommands
\ fit
\ flow
\ focus
+ \ focusminsize
\ gr
+ \ group
\ hardcopy
\ hardcopy_append
\ hardcopydir
@@ -155,6 +164,7 @@ syn keyword screenCommands
\ maxwin
\ meta
\ monitor
+ \ mousetrack
\ msgminwait
\ msgwait
\ multiuser
@@ -182,6 +192,7 @@ syn keyword screenCommands
\ register
\ remove
\ removebuf
+ \ rendition
\ reset
\ resize
\ screen
@@ -197,6 +208,7 @@ syn keyword screenCommands
\ sleep
\ slowpaste
\ sorendition
+ \ sort
\ source
\ split
\ startup_message
@@ -210,6 +222,7 @@ syn keyword screenCommands
\ time
\ title
\ umask
+ \ unbindall
\ unsetenv
\ utf8
\ vbell
@@ -228,6 +241,7 @@ syn keyword screenCommands
\ xon
\ zmodem
\ zombie
+ \ zombie_timeout
hi def link screenEscape Special
hi def link screenComment Comment
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 4087aff46e..60f23d2d83 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: May 29, 2015
-" Version: 137
+" Last Change: Oct 09, 2015
+" Version: 139
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
@@ -16,14 +16,14 @@ elseif exists("b:current_syntax")
finish
endif
-" AFAICT "." should be considered part of the iskeyword. Using iskeywords in
-" syntax is dicey, so the following code permits the user to
+" AFAICT "." should be considered part of the iskeyword for ksh. Using iskeywords
+" in syntax is dicey, so the following code permits the user to prevent/override
" g:sh_isk set to a string : specify iskeyword.
" g:sh_noisk exists : don't change iskeyword
-" g:sh_noisk does not exist : (default) append "." to iskeyword
+" g:sh_noisk does not exist : (default) append "." to iskeyword for kornshell
if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword
exe "setl isk=".g:sh_isk
-elseif !exists("g:sh_noisk") " optionally prevent appending '.' to iskeyword
+elseif !exists("g:sh_noisk") && exists("b:is_kornshell") " append '.' to iskeyword
setl isk+=.
endif
@@ -128,7 +128,7 @@ syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDere
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
-syn cluster shTestList contains=shCharClass,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
+syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
" Echo: {{{1
" ====
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
@@ -321,12 +321,11 @@ elseif !exists("g:sh_no_error")
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
-syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
" COMBAK: why is ,shComment on next line???
-syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
-syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
+syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
+syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
" Comments: {{{1
@@ -409,27 +408,27 @@ endif
if exists("b:is_bash")
if s:sh_fold_functions
- syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionFour fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionTwo fold matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionFour fold matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
- syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList
- syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
- syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList
- syn region shFunctionFour matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
+ syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList
+ syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
+ syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList
+ syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
endif
else
if s:sh_fold_functions
- syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
- syn region shFunctionFour fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionTwo fold matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
+ syn region shFunctionFour fold matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
- syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList
- syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
- syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList
- syn region shFunctionFour matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
+ syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList
+ syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
+ syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList
+ syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
endif
endif
diff --git a/runtime/syntax/systemd.vim b/runtime/syntax/systemd.vim
new file mode 100644
index 0000000000..5dfba74408
--- /dev/null
+++ b/runtime/syntax/systemd.vim
@@ -0,0 +1,8 @@
+" Vim syntax file
+" Language: systemd.unit(5)
+
+if !exists('b:current_syntax')
+ " Looks a lot like dosini files.
+ runtime! syntax/dosini.vim
+ let b:current_syntax = 'systemd'
+endif
diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim
index c76b046d8c..da2b975ddc 100644
--- a/runtime/syntax/vhdl.vim
+++ b/runtime/syntax/vhdl.vim
@@ -3,7 +3,7 @@
" 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 Apr 25 by Daniel Kho
+" Last Changed: 2015 Oct 13 by Daniel Kho
" $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $
" VHSIC (Very High Speed Integrated Circuit) Hardware Description Language
@@ -72,6 +72,7 @@ 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
@@ -92,12 +93,12 @@ syn match vhdlAttribute "\'reverse_range"
syn match vhdlAttribute "\'right"
syn match vhdlAttribute "\'ascending"
" block attributes
-syn match vhdlAttribute "\'behaviour"
-syn match vhdlAttribute "\'structure"
+"syn match vhdlAttribute "\'behaviour" " Non-standard VHDL
+"syn match vhdlAttribute "\'structure" " Non-standard VHDL
syn match vhdlAttribute "\'simple_name"
syn match vhdlAttribute "\'instance_name"
syn match vhdlAttribute "\'path_name"
-syn match vhdlAttribute "\'foreign"
+syn match vhdlAttribute "\'foreign" " VHPI
" signal attribute
syn match vhdlAttribute "\'active"
syn match vhdlAttribute "\'delayed"
@@ -112,10 +113,9 @@ syn match vhdlAttribute "\'driving"
syn match vhdlAttribute "\'driving_value"
" type attributes
syn match vhdlAttribute "\'base"
-syn match vhdlAttribute "\'high"
-syn match vhdlAttribute "\'left"
+syn match vhdlAttribute "\'subtype"
+syn match vhdlAttribute "\'element"
syn match vhdlAttribute "\'leftof"
-syn match vhdlAttribute "\'low"
syn match vhdlAttribute "\'pos"
syn match vhdlAttribute "\'pred"
syn match vhdlAttribute "\'rightof"
@@ -150,34 +150,76 @@ syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>"
syn match vhdlNumber "-\=\<\d\+\>"
syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
+
" operators
-syn keyword vhdlOperator and nand or nor xor xnor
-syn keyword vhdlOperator rol ror sla sll sra srl
-syn keyword vhdlOperator mod rem abs not
-syn match vhdlOperator "[&><=:+\-*\/|]"
-syn match vhdlSpecial "[().,;]"
+syn keyword vhdlOperator and nand or nor xor xnor
+syn keyword vhdlOperator rol ror sla sll sra srl
+syn keyword vhdlOperator mod rem abs not
+" TODO remove the following line. You can't have a sequence of */=+ as an operator for example.
+"syn match vhdlOperator "[&><=:+\-*\/|]"
+" The following lines match valid and invalid operators.
+
+" Concatenation and math operators
+syn match vhdlOperator "&\|+\|-\|\*\|\/"
+
+" Equality and comparison operators
+syn match vhdlOperator "=\|\/=\|>\|<\|>="
+
+" Assignment operators
+syn match vhdlOperator "<=\|:="
+syn match vhdlOperator "=>"
+
+" VHDL-2008 conversion, matching equality/non-equality operators
+syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>="
+
+" Linting for illegal operators
+" '='
+syn match vhdlError "\(=\)[<=&+\-\*\/\\]\+"
+syn match vhdlError "[=&+\-\*\\]\+\(=\)"
+" '>', '<'
+syn match vhdlError "\(>\)[<>&+\-\/\\]\+"
+syn match vhdlError "[>&+\-\/\\]\+\(>\)"
+syn match vhdlError "\(<\)[<&+\-\/\\]\+"
+syn match vhdlError "[<>=&+\-\/\\]\+\(<\)"
+" Covers most operators
+syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\-\*\\?:]\+"
+syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)"
+syn match vhdlError "\(?<\|?>\)[<>&+\-\*\/\\?:]\+"
+
+"syn match vhdlError "[?]\+\(&\|+\|\-\|\*\*\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|:=\|=>\)"
+" '/'
+syn match vhdlError "\(\/\)[<>&+\-\*\/\\?:]\+"
+syn match vhdlError "[<>=&+\-\*\/\\:]\+\(\/\)"
+
+syn match vhdlSpecial "<>"
+syn match vhdlSpecial "[().,;]"
+
+
" time
syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
+syn case match
syn keyword vhdlTodo contained TODO NOTE
syn keyword vhdlFixme contained FIXME
+syn case ignore
+
+syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
+syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell
-" Regex for space is '\s'
-" Any number of spaces: \s*
-" At least one space: \s+
-syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
-syn match vhdlComment "--.*" contains=vhdlTodo,vhdlFixme,@Spell
+" Industry-standard directives. These are not standard VHDL, but are commonly
+" used in the industry.
syn match vhdlPreProc "/\* synthesis .* \*/"
+"syn match vhdlPreProc "/\* simulation .* \*/"
syn match vhdlPreProc "/\* pragma .* \*/"
syn match vhdlPreProc "/\* synopsys .* \*/"
syn match vhdlPreProc "--\s*synthesis .*"
+"syn match vhdlPreProc "--\s*simulation .*"
syn match vhdlPreProc "--\s*pragma .*"
syn match vhdlPreProc "--\s*synopsys .*"
-" syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]"
"Modify the following as needed. The trade-off is performance versus functionality.
-syn sync minlines=200
+syn sync minlines=600
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -203,7 +245,7 @@ if version >= 508 || !exists("did_vhdl_syntax_inits")
HiLink vhdlTime Number
HiLink vhdlType Type
HiLink vhdlOperator Operator
-" HiLink vhdlGlobal Error
+ HiLink vhdlError Error
HiLink vhdlAttribute Special
HiLink vhdlPreProc PreProc