summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-01-28 22:47:25 +0100
committerBram Moolenaar <Bram@vim.org>2018-01-28 22:47:25 +0100
commit40962ec9c0e7b8699e101182b06ddd39dc0e1212 (patch)
tree8949df2955a3d9cc6c0e4a6e89aa123a31c0abbd /runtime
parent84b242c369a22b581c43de9de0152f0baedd71ab (diff)
downloadvim-git-40962ec9c0e7b8699e101182b06ddd39dc0e1212.tar.gz
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt2
-rw-r--r--runtime/doc/if_cscop.txt4
-rw-r--r--runtime/doc/if_pyth.txt23
-rw-r--r--runtime/doc/insert.txt51
-rw-r--r--runtime/doc/intro.txt4
-rw-r--r--runtime/doc/mbyte.txt4
-rw-r--r--runtime/doc/os_mac.txt4
-rw-r--r--runtime/doc/starting.txt4
-rw-r--r--runtime/doc/syntax.txt7
-rw-r--r--runtime/doc/tags4
-rw-r--r--runtime/doc/terminal.txt18
-rw-r--r--runtime/doc/todo.txt149
-rw-r--r--runtime/doc/usr_27.txt8
-rw-r--r--runtime/filetype.vim10
-rw-r--r--runtime/ftplugin/man.vim14
-rw-r--r--runtime/ftplugin/nsis.vim33
-rw-r--r--runtime/ftplugin/python.vim5
-rw-r--r--runtime/indent/nsis.vim91
-rw-r--r--runtime/scripts.vim4
-rw-r--r--runtime/syntax/autodoc.vim101
-rw-r--r--runtime/syntax/c.vim15
-rw-r--r--runtime/syntax/cmod.vim144
-rw-r--r--runtime/syntax/nsis.vim746
-rw-r--r--runtime/syntax/pike.vim418
-rw-r--r--runtime/syntax/readline.vim6
-rw-r--r--runtime/syntax/snobol4.vim15
26 files changed, 1547 insertions, 337 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 147a7910d..be24e7538 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.0. Last change: 2017 Dec 19
+*eval.txt* For Vim version 8.0. Last change: 2018 Jan 28
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index b69d2989d..6662717b1 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -1,4 +1,4 @@
-*if_cscop.txt* For Vim version 8.0. Last change: 2017 Nov 23
+*if_cscop.txt* For Vim version 8.0. Last change: 2018 Jan 21
VIM REFERENCE MANUAL by Andy Kahn
@@ -478,7 +478,7 @@ The cscope interface/support for Vim was originally written by
Andy Kahn <ackahn@netapp.com>. The original structure (as well as a tiny
bit of code) was adapted from the cscope interface in nvi.
*cscope-win32*
-For a cscope version for Win32 see (seems abandonded):
+For a cscope version for Win32 see (seems abandoned):
https://code.google.com/archive/p/cscope-win32/
Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index b4577fc68..6969c5db1 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt* For Vim version 8.0. Last change: 2017 Nov 09
+*if_pyth.txt* For Vim version 8.0. Last change: 2018 Jan 28
VIM REFERENCE MANUAL by Paul Moore
@@ -809,7 +809,8 @@ Raising SystemExit exception in python isn't endorsed way to quit vim, use: >
You can test what Python version is available with: >
if has('python')
echo 'there is Python 2.x'
- elseif has('python3')
+ endif
+ if has('python3')
echo 'there is Python 3.x'
endif
@@ -818,6 +819,24 @@ dynamically, these has() calls will try to load them. If only one can be
loaded at a time, just checking if Python 2 or 3 are available will prevent
the other one from being available.
+To avoid loading the dynamic library, only check if Vim was compiled with
+python support: >
+ if has('python_compiled')
+ echo 'compiled with Python 2.x support'
+ if has('python_dynamic
+ echo 'Python 2.x dynamically loaded
+ endif
+ endif
+ if has('python3_compiled')
+ echo 'compiled with Python 3.x support'
+ if has('python3_dynamic
+ echo 'Python 3.x dynamically loaded
+ endif
+ endif
+
+This also tells you whether Python is dynamically loaded, which will fail if
+the runtime library cannot be found.
+
==============================================================================
11. Python X *python_x* *pythonx*
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 640c8e985..73719113f 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 8.0. Last change: 2017 Nov 23
+*insert.txt* For Vim version 8.0. Last change: 2018 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -433,7 +433,7 @@ An example for using CTRL-G U: >
inoremap ( ()<C-G>U<Left>
This makes it possible to use the cursor keys in Insert mode, without breaking
-the undo sequence and therefore using |.| (redo) will work as expected.
+the undo sequence and therefore using |.| (redo) will work as expected.
Also entering a text like (with the "(" mapping from above): >
Lorem ipsum (dolor
@@ -1473,7 +1473,7 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
Notes:
- Vim will load/evaluate code in order to provide completions. This may
- cause some code execution, which may be a concern. This is no longer
+ cause some code execution, which may be a concern. This is no longer
enabled by default, to enable this feature add >
let g:rubycomplete_buffer_loading = 1
<- In context 1 above, Vim can parse the entire buffer to add a list of
@@ -1529,15 +1529,15 @@ that begin with the filetype, "php", in this case. For example these syntax
groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions.
-If you wish non-filetype syntax items to also be included, you can use a
-regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim)
-to add items. Looking at the output from ":syntax list" while editing a PHP file
-I can see some of these entries: >
+If you wish non-filetype syntax items to also be included, you can use a
+regular expression syntax (added in version 13.0 of
+autoload\syntaxcomplete.vim) to add items. Looking at the output from
+":syntax list" while editing a PHP file I can see some of these entries: >
htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
To pick up any JavaScript and HTML keyword syntax groups while editing a PHP
-file, you can use 3 different regexs, one for each language. Or you can
-simply restrict the include groups to a particular value, without using
+file, you can use 3 different regexs, one for each language. Or you can
+simply restrict the include groups to a particular value, without using
a regex string: >
let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+'
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
@@ -1550,9 +1550,9 @@ highlight. These items will be available within the omni completion list.
Some people may find this list unwieldy or are only interested in certain
items. There are two ways to prune this list (if necessary). If you find
-certain syntax groups you do not wish displayed you can use two different
-methods to identify these groups. The first specifically lists the syntax
-groups by name. The second uses a regular expression to identify both
+certain syntax groups you do not wish displayed you can use two different
+methods to identify these groups. The first specifically lists the syntax
+groups by name. The second uses a regular expression to identify both
syntax groups. Simply add one the following to your vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
let g:omni_syntax_group_exclude_php = 'php\w*Constant'
@@ -1575,22 +1575,22 @@ vimrc: >
For plugin developers, the plugin exposes a public function OmniSyntaxList.
This function can be used to request a List of syntax items. When editing a
-SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
+SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
various groups and syntax items. For example: >
- syntax list
-
-Yields data similar to this: >
- sqlOperator xxx some prior all like and any escape exists in is not
- or intersect minus between distinct
- links to Operator
- sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier
- date money long tinyint unsigned xml text smalldate
- double datetime nchar smallint numeric time bit char
- varbinary binary smallmoney
- image float integer timestamp real decimal
+ syntax list
+
+Yields data similar to this:
+ sqlOperator xxx some prior all like and any escape exists in is not ~
+ or intersect minus between distinct ~
+ links to Operator ~
+ sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~
+ date money long tinyint unsigned xml text smalldate ~
+ double datetime nchar smallint numeric time bit char ~
+ varbinary binary smallmoney ~
+ image float integer timestamp real decimal ~
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
-a List of syntax items you can call OmniSyntaxList a number of different
+a List of syntax items you can call OmniSyntaxList a number of different
ways. To retrieve all syntax items regardless of syntax group: >
echo OmniSyntaxList( [] )
@@ -1607,7 +1607,6 @@ From within a plugin, you would typically assign the output to a List: >
let myKeywords = []
let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
-
SQL *ft-sql-omni*
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 24ceb470d..0f849341f 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -1,4 +1,4 @@
-*intro.txt* For Vim version 8.0. Last change: 2017 Sep 04
+*intro.txt* For Vim version 8.0. Last change: 2018 Jan 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -138,7 +138,7 @@ There are two ways to report bugs, both work:
see the message. If you don't want that, e.g. because it is a security
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
(that's Bram).
-2. Open issue on GitHub: https://github.com/vim/vim/issues
+2. Open an issue on GitHub: https://github.com/vim/vim/issues
The text will be forwarded to the vim-dev maillist.
Please be brief; all the time that is spent on answering mail is subtracted
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt
index c8cd0eb95..c25eb647e 100644
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -1,4 +1,4 @@
-*mbyte.txt* For Vim version 8.0. Last change: 2017 Nov 30
+*mbyte.txt* For Vim version 8.0. Last change: 2018 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -1258,7 +1258,7 @@ Combining forms:
10. Input with imactivatefunc() *mbyte-func*
Vim has the 'imactivatefunc' and 'imstatusfunc' options. These are useful to
-activate/deativate the input method from Vim in any way, also with an external
+activate/deactivate the input method from Vim in any way, also with an external
command. For example, fcitx provide fcitx-remote command: >
set iminsert=2
diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt
index 2a2b07a7a..226d3ba81 100644
--- a/runtime/doc/os_mac.txt
+++ b/runtime/doc/os_mac.txt
@@ -1,4 +1,4 @@
-*os_mac.txt* For Vim version 8.0. Last change: 2017 Apr 28
+*os_mac.txt* For Vim version 8.0. Last change: 2018 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -165,7 +165,7 @@ and then run `make` to build Vim. The order of the options doesn't matter.
To make sure at runtime whether or not the darwin feature is compiled in, you
can use `has('osxdarwin')` which returns 1 if the feature is compiled in; 0
-otherwise. For backwards comptibility, you can still use `macunix` instead of
+otherwise. For backward compatibility, you can still use `macunix` instead of
`osxdarwin`.
Notable use cases where `--disable-darwin` is turned out to be useful are:
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 6ac684a13..15187b61e 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 8.0. Last change: 2017 Nov 18
+*starting.txt* For Vim version 8.0. Last change: 2018 Jan 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1043,7 +1043,7 @@ giving the mapping.
Defaults without a .vimrc file ~
*defaults.vim*
If Vim is started normally and no user vimrc file is found, the
-$VIMRUTIME/defaults.vim script is loaded. This will set 'compatible' off,
+$VIMRUNTIME/defaults.vim script is loaded. This will set 'compatible' off,
switch on syntax highlighting and a few more things. See the script for
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
patch 7.4.2111 to be exact).
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 50d90008d..9f062fc6d 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 8.0. Last change: 2017 Dec 22
+*syntax.txt* For Vim version 8.0. Last change: 2018 Jan 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5025,6 +5025,11 @@ StatusLine status line of current window
StatusLineNC status lines of not-current windows
Note: if this is equal to "StatusLine" Vim will use "^^^" in
the status line of the current window.
+ *hl-StatusLineTerm*
+StatusLineTerm status line of current window, if it is a |terminal| window.
+ *hl-StatusLineTermNC*
+StatusLineTermNC status lines of not-current windows that is a |terminal|
+ window.
*hl-TabLine*
TabLine tab pages line, not active tab page label
*hl-TabLineFill*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index f43e5dee3..112a0eaf1 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6825,6 +6825,8 @@ hl-SpellLocal syntax.txt /*hl-SpellLocal*
hl-SpellRare syntax.txt /*hl-SpellRare*
hl-StatusLine syntax.txt /*hl-StatusLine*
hl-StatusLineNC syntax.txt /*hl-StatusLineNC*
+hl-StatusLineTerm syntax.txt /*hl-StatusLineTerm*
+hl-StatusLineTermNC syntax.txt /*hl-StatusLineTermNC*
hl-TabLine syntax.txt /*hl-TabLine*
hl-TabLineFill syntax.txt /*hl-TabLineFill*
hl-TabLineSel syntax.txt /*hl-TabLineSel*
@@ -6839,6 +6841,8 @@ hl-Visual syntax.txt /*hl-Visual*
hl-VisualNOS syntax.txt /*hl-VisualNOS*
hl-WarningMsg syntax.txt /*hl-WarningMsg*
hl-WildMenu syntax.txt /*hl-WildMenu*
+hl-debugBreakpoint terminal.txt /*hl-debugBreakpoint*
+hl-debugPC terminal.txt /*hl-debugPC*
hlID() eval.txt /*hlID()*
hlexists() eval.txt /*hlexists()*
hlsearch-variable eval.txt /*hlsearch-variable*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index a1576fa15..896c55417 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 8.0. Last change: 2017 Dec 22
+*terminal.txt* For Vim version 8.0. Last change: 2018 Jan 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -149,11 +149,6 @@ Syntax ~
keys in the terminal window. For MS-Windows see the
++eof argument below.
- Two comma separated numbers are used as "rows,cols".
- E.g. `:24,80gdb` opens a terminal with 24 rows and 80
- columns. However, if the terminal window spans the
- Vim window with, there is no vertical split, the Vim
- window width is used.
*term++close* *term++open*
Supported [options] are:
++close The terminal window will close
@@ -168,9 +163,15 @@ Syntax ~
++hidden Open the terminal in a hidden buffer,
no window will be used.
++rows={height} Use {height} for the terminal window
- height.
+ height. If the terminal uses the full
+ Vim height (no window above or below
+ th terminal window) the command line
+ height will be reduced as needed.
++cols={width} Use {width} for the terminal window
- width.
+ width. If the terminal uses the full
+ Vim width (no window left or right of
+ the terminal window) this value is
+ ignored.
++eof={text} when using [range]: text to send after
the last line was written. Cannot
contain white space. A CR is
@@ -524,6 +525,7 @@ interface. This probably requires gdb version 7.12. if you get this error:
Undefined command: "new-ui". Try "help".~
Then your gdb is too old.
+ *hl-debugPC* *hl-debugBreakpoint*
The color of the signs can be adjusted with these highlight groups:
- debugPC the current position
- debugBreakpoint a breakpoint
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 7eeb2c3b8..b56221b0f 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.0. Last change: 2017 Dec 23
+*todo.txt* For Vim version 8.0. Last change: 2018 Jan 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -133,7 +133,8 @@ http://vimawesome.com/?q=tag:color-scheme
Use names that indicate their appearance (Christian Brabandt, 2017 Aug 3)
- monokai - Xia Crusoe (2017 Aug 4)
- seoul256 - Christian Brabandt (2017 Aug 3)
-- gruvbox - Christian Brabandt (2017 Aug 3)
+- gruvbox - Christian Brabandt (2017 Aug 3) (simplified version from
+ Lifepillar, 2018 Jan 22, #2573)
- janah - Marco Hinz (2017 Aug 4)
- apprentice - Romain Lafourcade (2017 Aug 6) remarks about help file #1964
Suggested by Hiroki Kokubun:
@@ -151,6 +152,56 @@ Reproducible:
arga
al
al
+Patch to fix using freed memory. (Christian Brabandt, 2018 Jan 6, #2467)
+
+Patch for nsis runtime files. (Ken Takata, 2018 Jan 25)
+
+Patch for scheme runtime files (new version) (Evan Hanson, 2018 Jan 26)
+
+Patch to turn tests into new style. (Yegappan, 2017 Dec 29, #2509)
+
+Patch to fix crash in rubyf. (W, #2512) fixes #2511
+
+Updates for Debian runtime files. (James McCoy, 2018 Jan 7)
+
+Crash when calling term_start() with empty command on windows. (Wang Shidong,
+2018 Dec 27, #2501)
+
+Patch to improve DirectX rendering. (Ken Takata, 2018 Jan 18, #2560 fixes
+#2401)
+
+Endless loop invovlving gui_mch_stop_blink(). (zdohnal, 2018 Jan 11)
+
+Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
+2016 Nov 21, #1266)
+
+"silent! try" doesn't restore emsg_silent when an exception is thrown.
+(Ben Reilly, 2018 Jan 5, #2531) Possible solution by Christian Brabandt, 2018
+Jan 6.
+
+Patch to fix ex mode buffering output. (Brian M. Carlson, 2018 Jan 8, #2537)
+
+Patch for config.vim syntax file. (James McCoy, 2018 Jan 28, maintainer didn't
+respond).
+
+Patch to add support for clojure script filetype detection. (David Burgin,
+2018 Jan 20, #257)
+
+Patch to implement the DirChanged autocmd event. (Andy Massimino, 2018 Jan 9,
+replaces #888)
+
+Patch to fix not adding a slash after :find completion. (Genki Sky, 2018 Jan
+10)
+
+Patch for man.vim, fix for Mac. (SungHyun Nam, 2018 Jan 8, #2488)
+Update Jan 10.
+
+Patch to fix illegal memory access in del_bytes(). (Christian Brabandt, 2018
+Jan 2, #2466)
+
+Recursive use of alist_add() (Christian Brabandt, 2018 Jan 6, #2472)
+
+patch 1218 breaks etags. (zdohnal, 2018 Jan 5)
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
@@ -161,15 +212,59 @@ Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in get_address() (#2248)
- signed integer overflow in getdecchrs() (#2254)
- signed integer overflow in nfa_regatom() (#2251)
+ patch by Christian Brabandt, 2018 Jan 8
- undefined left shift in get_string_tv() (#2250)
+Patch to fix CursorIM highlighting on Windows. (Ken Takata, 2018 Jan 18)
+
+Cursor in wrong screen line with WinBar. (#2362)
+Fix by Christian Brabandt (2018 Jan 2)
+
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
Also see #2352, want better control over balloon, perhaps set the position.
+Patch to make installer faster. (Ken Takata, 2018 Jan 3, #2522)
+
+Patch to support hunspell. (Matej Cepl, Jan 2018, #2500)
+
+Cursor in status line after search. (#2530)
+
+Cursor in wrong position when line wraps. (#2540)
+
+Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
+
+Patch for minimum width of completion popup menu. (Christian Brabandt, 2018
+Jan 3, #2314)
+
When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994)
+Patch to make D&D work between 32 bit app and 64 bit Vim. (Ken Takata, #2504)
+
+Patch to fix invalid return value with backwards searchpair. (Daniel Hahler,
+2018 Jan 15, #2552)
+
+Column number is wrong whsn using 'linebreak' and 'wrap'. (Keith Smiley, 2018
+Jan 15, #2555)
+
+Patch to remove redundant "if". (Dominique Pelle, 2018 Jan 14)
+
+Serbian translations. (Peseic, 2018 Jan 17)
+
+Check argument of systemlist(). (Pavlov)
+
+Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
+#2546)
+
+Patch to fix illegal memory access. (Christian Brabandt, 2018 Jan 6, #2523)
+
+When 'inchsearch' and 'hlsearch' are set /\v highlights everything.
+Also see #2337
+
+Starting job with cwd option, when the directory does not exist, gives a
+confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
+
7 Add a watchpoint in the debug mode: An expression that breaks execution
when evaluating to non-zero. Add the "watchadd expr" command, stop when
the value of the expression changes. ":watchdel" deletes an item,
@@ -179,6 +274,20 @@ Patch by Christian Brabandt, 2016 Jun 10, #859
7 Make "ga" show the digraph for a character, if it exists.
Patch from Christian Brabandt, 2011 Aug 19.
+Patch to add "module" to quickfix entries. (Marcin Szamotulski, Coot, 2017 Jun
+8, #1757) Now part of #2322. Or #2327? #1757 was re-opened, include that
+first.
+
+ch_sendraw() with long string does not try to read inbetween, which may cause
+a deadlock if the reading side is waiting for the write to finish. (Nate
+Bosch, 2018 Jan 13, #2548)
+
+Problem with mouse scroll in tmux. (fcying, #2419) Might be caused by patch
+8.0.1309.
+
+Des setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
+mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
+
Fold at end of the buffer behaves inconsistently. (James McCoy, 2017 Oct 9)
With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
@@ -197,6 +306,19 @@ Takasaki, Ken Takata, 2017 Oct 1, #2060).
ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737)
Lemonboy can reproduce (2017 Jun 5)
+When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
+highlighted. (van-debugger, 2018 Jan 23, #2576)
+
+Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
+
+No profile information for function that executes ":quit". (Daniel Hahler,
+2017 Dec 26, #2501)
+
+Get a "No Name" buffer when 'hidden' is set and opening a new window from the
+quickfix list. (bfrg, 2018 Jan 22, #2574)
+
+A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
+
Patch to fix E806. (Dominique, 2017 Nov 22, #2368)
Kazunobu Kuriyama: caused by XtSetLanguageProc().
@@ -219,6 +341,9 @@ Patch to fix encoding in print document name (Yasuhiro Matsumoto, 2017 Dec 20,
Patch to copy buffer-local options before buffer leaves the window. (Bjorn
Linse, 2017 Nov 14, #2336)
+Join truncates xml comment. (Dmitrii Tcyganok, 2017 Dec 24, #2494)
+Requires 'formatoptions' to include "j". (Gary Johnson, 2017 Dec 24)
+
When a timer is running and typing CTRL-R on the command line, it is not
redrawn properly. (xtal8, 2017 Oct 23, #2241)
@@ -276,12 +401,11 @@ line breaks. (Ken Takata, 2017 Aug 22)
The ":move" command does not honor closed folds. (Ryan Lue, #2351)
Memory leaks in test_channel? (or is it because of fork())
-Memory leak in test_arabic.
Using uninitialized value in test_crypt.
Memory leaks in test_escaped_glob
Patch to clear background when "guibg=NONE" is used and 'termguicolors' is
-set.
+set. (Nick Jensen, 2017 Nov 13, #2332, based on #981 by Kazunobu Kuriyama)
Patch to make gM move to middle of line. (Yasuhiro Matsumoto, Sep 8, #2070)
@@ -292,6 +416,9 @@ It can replace the BeOS code, which is likely not used anymore.
Now on github: #1856. Updated Oct 2017
Got permission to include this under the Vim license.
+Patch to include hunspell support. (Matej Cepl, 2017 Dec 26, #845)
+Doesn't work on Windows yet.
+
Refactored HTML indent file. (Michael Lee, #1821)
Test_writefile_fails_conversion failure on Solaris because if different iconv
@@ -357,10 +484,6 @@ stack trace. (Yggdroot, 2017 Jul 28, #1887)
Profile of a dict function is lost when the dict is deleted. Would it be
possible to collect this? (Daniel Hahler, #2350)
-Patch to add "module" to quickfix entries. (Marcin Szamotulski, Coot, 2017 Jun
-8, #1757) Now part of #2322. Or #2327? #1757 was re-opened, include that
-first.
-
Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
#2322) Now in #2327?
@@ -438,7 +561,7 @@ Perhaps simpler: actually delete the mappings. Use maplist() to list matching
mappings (with a lhs prefix, like maparg()), mapdelete() to delete,
maprestore() to restore (using the output of maplist()).
-Add an argument to :mkvimrc (or add aother command) to skip mappings from
+Add an argument to :mkvimrc (or add another command) to skip mappings from
plugins (source is a Vim script). No need to put these in a .vimrc, they will
be defined when the plugin is loaded.
@@ -707,9 +830,6 @@ Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
Have a way to get the call stack, in a function and from an exception.
#1125
-Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
-2016 Nov 21, #1266)
-
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
@@ -953,7 +1073,8 @@ When using --remote-tab on MS-Windows 'encoding' hasn't been initialized yet,
the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
-Sep 10)
+Sep 10) Update 2018 Jan 4 #2575
+Alternate change by Ken Takata.
Example in editing.txt uses $HOME with the expectation that it ends in a
slash. For me it does, but perhaps not for everybody. Add a function that
@@ -1916,8 +2037,6 @@ Haskell, 2010 Aug 24)
This does not work yet: "a\(%C\)" (get composing characters into a submatch).
-A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
-
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
messages, even though locale is not supported. But ":lang messages
es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt
index 44aa4063d..653ee4343 100644
--- a/runtime/doc/usr_27.txt
+++ b/runtime/doc/usr_27.txt
@@ -1,4 +1,4 @@
-*usr_27.txt* For Vim version 8.0. Last change: 2010 Mar 28
+*usr_27.txt* For Vim version 8.0. Last change: 2018 Jan 26
VIM USER MANUAL - by Bram Moolenaar
@@ -225,9 +225,9 @@ specify a line offset, this can cause trouble. For example: >
/const/-2
This finds the next word "const" and then moves two lines up. If you
-use "n" to search again, Vim could start at the current position and find the same
-"const" match. Then using the offset again, you would be back where you started.
-You would be stuck!
+use "n" to search again, Vim could start at the current position and find the
+same "const" match. Then using the offset again, you would be back where you
+started. You would be stuck!
It could be worse: Suppose there is another match with "const" in the next
line. Then repeating the forward search would find this match and move two
lines up. Thus you would actually move the cursor back!
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 2f283a707..7a31a10b7 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Nov 23
+" Last Change: 2018 Jan 28
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -239,6 +239,7 @@ endif
" C or lpc
au BufNewFile,BufRead *.c call dist#ft#FTlpc()
+au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
" Calendar
au BufNewFile,BufRead calendar setf calendar
@@ -378,7 +379,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
au BufNewFile,BufRead configure.in,configure.ac setf config
" CUDA Cumpute Unified Device Architecture
-au BufNewFile,BufRead *.cu setf cuda
+au BufNewFile,BufRead *.cu,*.cuh setf cuda
" Dockerfile
au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile
@@ -1152,8 +1153,9 @@ au BufNewFile,BufRead *.pod6 setf pod6
" Also .ctp for Cake template file
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
-" Pike
-au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike
+" Pike and Cmod
+au BufNewFile,BufRead *.pike,*.pmod setf pike
+au BufNewFile,BufRead *.cmod setf cmod
" Pinfo config
au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index cfcabc3fb..9e9715693 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Last Change: 2017 Nov 11
+" Last Change: 2018 Jan 15
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -39,7 +39,7 @@ if &filetype == "man"
endif
if exists(":Man") != 2
- com -nargs=+ Man call s:GetPage(<f-args>)
+ com -nargs=+ -complete=shellcmd Man call s:GetPage(<f-args>)
nmap <Leader>K :call <SID>PreGetPage(0)<CR>
nmap <Plug>ManPreGetPage :call <SID>PreGetPage(0)<CR>
endif
@@ -173,7 +173,15 @@ func <SID>GetPage(...)
" Ensure Vim is not recursively invoked (man-db does this) when doing ctrl-[
" on a man page reference by unsetting MANPAGER.
- silent exec "r !env -u MANPAGER man ".s:GetCmdArg(sect, page)." | col -b"
+ " Some versions of env(1) do not support the '-u' option, and in such case
+ " we set MANPAGER=cat.
+ if !exists('s:env_has_u')
+ call system('env -u x true')
+ let s:env_has_u = (v:shell_error == 0)
+ endif
+ let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
+ let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
+ silent exec "r !" . man_cmd
if unsetwidth
let $MANWIDTH = ''
diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim
index 949691bf6..1a35127c8 100644
--- a/runtime/ftplugin/nsis.vim
+++ b/runtime/ftplugin/nsis.vim
@@ -1,22 +1,43 @@
" Vim ftplugin file
-" Language: NSIS script
-" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
-
-let s:cpo_save = &cpo
-set cpo&vim
+" Language: NSIS script
+" Maintainer: Ken Takata
+" URL: https://github.com/k-takata/vim-nsis
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Last Change: 2018-01-26
if exists("b:did_ftplugin")
finish
endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl com< cms< fo< def< inc<"
+ \ " | unlet! b:match_ignorecase b:match_words"
setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\=
setlocal include=^\\s*!include\\%(/NONFATAL\\)\\=
+if exists("loaded_matchit")
+ let b:match_ignorecase = 1
+ let b:match_words =
+ \ '\${\%(If\|IfNot\|Unless\)}:\${\%(Else\|ElseIf\|ElseIfNot\|ElseUnless\)}:\${\%(EndIf\|EndUnless\)},' .
+ \ '\${Select}:\${EndSelect},' .
+ \ '\${Switch}:\${EndSwitch},' .
+ \ '\${\%(Do\|DoWhile\|DoUntil\)}:\${\%(Loop\|LoopWhile\|LoopUntil\)},' .
+ \ '\${\%(For\|ForEach\)}:\${Next},' .
+ \ '\<Function\>:\<FunctionEnd\>,' .
+ \ '\<Section\>:\<SectionEnd\>,' .
+ \ '\<SectionGroup\>:\<SectionGroupEnd\>,' .
+ \ '\<PageEx\>:\<PageExEnd\>,' .
+ \ '\${MementoSection}:\${MementoSectionEnd},' .
+ \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' .
+ \ '!macro\>:!macroend\>'
+endif
+
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 54926418d..56f19cb32 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Thur, 09 November 2017
+" Last Change: Wed, 20 December 2017
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -20,6 +20,9 @@ setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal omnifunc=pythoncomplete#Complete
+if has('python3')
+ setlocal omnifunc=python3complete#Complete
+endif
set wildignore+=*.pyc
diff --git a/runtime/indent/nsis.vim b/runtime/indent/nsis.vim
new file mode 100644
index 000000000..223f4fa28
--- /dev/null
+++ b/runtime/indent/nsis.vim
@@ -0,0 +1,91 @@
+" Vim indent file
+" Language: NSIS script
+" Maintainer: Ken Takata
+" URL: https://github.com/k-takata/vim-nsis
+" Last Change: 2018-01-21
+" Filenames: *.nsi
+" License: VIM License
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal nosmartindent
+setlocal noautoindent
+setlocal indentexpr=GetNsisIndent(v:lnum)
+setlocal indentkeys=!^F,o,O
+setlocal indentkeys+==~${Else,=~${EndIf,=~${EndUnless,=~${AndIf,=~${AndUnless,=~${OrIf,=~${OrUnless,=~${Case,=~${Default,=~${EndSelect,=~${EndSwith,=~${Loop,=~${Next,=~${MementoSectionEnd,=~FunctionEnd,=~SectionEnd,=~SectionGroupEnd,=~PageExEnd,0=~!macroend,0=~!if,0=~!else,0=~!endif
+
+if exists("*GetNsisIndent")
+ finish
+endif
+
+function! GetNsisIndent(lnum)
+ " If this line is explicitly joined: If the previous line was also joined,
+ " line it up with that one, otherwise add two 'shiftwidth'
+ if getline(a:lnum - 1) =~ '\\$'
+ if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
+ return indent(a:lnum - 1)
+ endif
+ return indent(a:lnum - 1) + shiftwidth() * 2
+ endif
+
+ " Grab the current line, stripping comments.
+ let l:thisl = substitute(getline(a:lnum), '[;#].*$', '', '')
+ " Check if this line is a conditional preprocessor line.
+ let l:preproc = l:thisl =~? '^\s*!\%(if\|else\|endif\)'
+
+ " Grab the previous line, stripping comments.
+ " Skip preprocessor lines and continued lines.
+ let l:prevlnum = a:lnum
+ while 1
+ let l:prevlnum = prevnonblank(l:prevlnum - 1)
+ if l:prevlnum == 0
+ " top of file
+ return 0
+ endif
+ let l:prevl = substitute(getline(l:prevlnum), '[;#].*$', '', '')
+ let l:prevpreproc = l:prevl =~? '^\s*!\%(if\|else\|endif\)'
+ if l:preproc == l:prevpreproc && getline(l:prevlnum - 1) !~? '\\$'
+ break
+ endif
+ endwhile
+ let l:previ = indent(l:prevlnum)
+ let l:ind = l:previ
+
+ if l:preproc
+ " conditional preprocessor
+ if l:prevl =~? '^\s*!\%(if\%(\%(macro\)\?n\?def\)\?\|else\)\>'
+ let l:ind += shiftwidth()
+ endif
+ if l:thisl =~? '^\s*!\%(else\|endif\)\?\>'
+ let l:ind -= shiftwidth()
+ endif
+ return l:ind
+ endif
+
+ if l:prevl =~? '^\s*\%(\${\%(If\|IfNot\|Unless\|ElseIf\|ElseIfNot\|ElseUnless\|Else\|AndIf\|AndIfNot\|AndUnless\|OrIf\|OrIfNot\|OrUnless\|Select\|Case\|Case[2-5]\|CaseElse\|Default\|Switch\|Do\|DoWhile\|DoUntil\|For\|ForEach\|MementoSection\)}\|Function\>\|Section\>\|SectionGroup\|PageEx\>\|!macro\>\)'
+ " previous line opened a block
+ let l:ind += shiftwidth()
+ endif
+ if l:thisl =~? '^\s*\%(\${\%(ElseIf\|ElseIfNot\|ElseUnless\|Else\|EndIf\|EndUnless\|AndIf\|AndIfNot\|AndUnless\|OrIf\|OrIfNot\|OrUnless\|Loop\|LoopWhile\|LoopUntil\|Next\|MementoSectionEnd\)\>}\?\|FunctionEnd\>\|SectionEnd\>\|SectionGroupEnd\|PageExEnd\>\|!macroend\>\)'
+ " this line closed a block
+ let l:ind -= shiftwidth()
+ elseif l:thisl =~? '^\s*\${\%(Case\|Case[2-5]\|CaseElse\|Default\)\>}\?'
+ if l:prevl !~? '^\s*\${\%(Select\|Switch\)}'
+ let l:ind -= shiftwidth()
+ endif
+ elseif l:thisl =~? '^\s*\${\%(EndSelect\|EndSwitch\)\>}\?'
+ " this line closed a block
+ if l:prevl =~? '^\s*\${\%(Select\|Switch\)}'
+ let l:ind -= shiftwidth()
+ else
+ let l:ind -= shiftwidth() * 2
+ endif
+ endif
+
+ return l:ind
+endfunction
+
+" vim: ts=8 sw=2 sts=2
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 18263e284..71e3f48bd 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -100,6 +100,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'make\>'
set ft=make
+ " Pike
+ elseif s:name =~# '^pike\%(\>\|[0-9]\)'
+ set ft=pike
+
" Lua
elseif s:name =~# 'lua'
set ft=lua
diff --git a/runtime/syntax/autodoc.vim b/runtime/syntax/autodoc.vim
new file mode 100644
index 000000000..67a627e46
--- /dev/null
+++ b/runtime/syntax/autodoc.vim
@@ -0,0 +1,101 @@
+" Vim syntax file
+" Language: Autodoc
+" Maintainer: Stephen R. van den Berg <srb@cuci.nl>
+" Last Change: 2018 Jan 23
+" Version: 2.9
+" Remark: Included by pike.vim, cmod.vim and optionally c.vim
+" Remark: In order to make c.vim use it, set: c_autodoc
+
+" Quit when a (custom) syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn case match
+
+" A bunch of useful autodoc keywords
+syn keyword autodocStatement contained appears belongs global
+syn keyword autodocStatement contained decl directive inherit
+syn keyword autodocStatement contained deprecated obsolete bugs
+syn keyword autodocStatement contained copyright example fixme note param returns
+syn keyword autodocStatement contained seealso thanks throws constant
+syn keyword autodocStatement contained member index elem
+syn keyword autodocStatement contained value type item
+
+syn keyword autodocRegion contained enum mapping code multiset array
+syn keyword autodocRegion contained int string section mixed ol ul dl
+syn keyword autodocRegion contained class module namespace
+syn keyword autodocRegion contained endenum endmapping endcode endmultiset
+syn keyword autodocRegion contained endarray endint endstring endsection
+syn keyword autodocRegion contained endmixed endol endul enddl
+syn keyword autodocRegion contained endclass endmodule endnamespace
+
+syn keyword autodocIgnore contained ignore endignore
+
+syn keyword autodocStatAcc contained b i u tt url pre sub sup
+syn keyword autodocStatAcc contained ref rfc xml dl expr image
+
+syn keyword autodocTodo contained TODO FIXME XXX
+
+syn match autodocLineStart display "\(//\|/\?\*\)\@2<=!"
+syn match autodocWords "[^!@{}[\]]\+" display contains=@Spell
+
+syn match autodocLink "@\[[^[\]]\+]"hs=s+2,he=e-1 display contains=autodocLead
+syn match autodocAtStmt "@[a-z]\+\%(\s\|$\)\@="hs=s+1 display contains=autodocStatement,autodocIgnore,autodocLead,autodocRegion
+
+" Due to limitations of the matching algorithm, we cannot highlight
+" nested autodocNStmtAcc structures correctly
+syn region autodocNStmtAcc start="@[a-z]\+{" end="@}" contains=autodocStatAcc,autodocLead keepend
+
+syn match autodocUrl contained display ".\+"
+syn region autodocAtUrlAcc start="{"ms=s+1 end="@}"he=e-1,me=e-2 contained display contains=autodocUrl,autodocLead keepend
+syn region autodocNUrlAcc start="@url{" end="@}" contains=autodocStatAcc,autodocAtUrlAcc,autodocLead transparent
+
+syn match autodocSpecial "@@" display
+syn match autodocLead "@" display contained
+
+"when wanted, highlight trailing white space
+if exists("c_space_errors")
+ if !exists("c_no_trail_space_error")
+ syn match autodocSpaceError display excludenl "\s\+$"
+ endif
+ if !exists("c_no_tab_space_error")
+ syn match autodocSpaceError display " \+\t"me=e-1
+ endif
+endif
+
+if exists("c_minlines")
+ let b:c_minlines = c_minlines
+else
+ if !exists("c_no_if0")
+ let b:c_minlines = 50 " #if 0 constructs can be long
+ else
+ let b:c_minlines = 15 " mostly for () constructs
+ endif
+endif
+exec "syn sync ccomment autodocComment minlines=" . b:c_minlines
+
+" Define the default highlighting.
+" Only used when an item doesn't have highlighting yet
+hi def link autodocStatement Statement
+hi def link autodocStatAcc Statement
+hi def link autodocRegion Structure
+hi def link autodocAtStmt Error
+hi def link autodocNStmtAcc Identifier
+hi def link autodocLink Type
+hi def link autodocTodo Todo
+hi def link autodocSpaceError Error
+hi def link autodocLineStart SpecialComment
+hi def link autodocSpecial SpecialChar
+hi def link autodocUrl Underlined
+hi def link autodocLead Statement
+hi def link autodocIgnore Delimiter
+
+let b:current_syntax = "autodoc"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+" vim: ts=8
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index f659a87b7..1143ca7dd 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -13,6 +13,14 @@ set cpo&vim
let s:ft = matchstr(&ft, '^\([^.]\)\+')
+" Optional embedded Autodoc parsing
+" To enable it add: let g:c_autodoc = 1
+" to your .vimrc
+if exists("c_autodoc")
+ syn include @cAutodoc <sfile>:p:h/autodoc.vim
+ unlet b:current_syntax
+endif
+
" A bunch of useful C keywords
syn keyword cStatement goto break return continue asm
syn keyword cLabel case default
@@ -377,6 +385,13 @@ syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInP
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
+" Optional embedded Autodoc parsing
+if exists("c_autodoc")
+ syn match cAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cAutodoc containedin=cComment,cCommentL
+ syn cluster cCommentGroup add=cAutodocReal
+ syn cluster cPreProcGroup add=cAutodocReal
+endif
+
" Highlight User Labels
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
if s:ft ==# 'c' || exists("cpp_no_cpp11")
diff --git a/runtime/syntax/cmod.vim b/runtime/syntax/cmod.vim
new file mode 100644
index 000000000..ea37682ff
--- /dev/null
+++ b/runtime/syntax/cmod.vim
@@ -0,0 +1,144 @@
+" Vim syntax file
+" Language: Cmod
+" Current Maintainer: Stephen R. van den Berg <srb@cuci.nl>
+" Last Change: 2018 Jan 23
+" Version: 2.9
+" Remark: Is used to edit Cmod files for Pike development.
+" Remark: Includes a highlighter for any embedded Autodoc format.
+
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Read the C syntax to start with
+runtime! syntax/c.vim
+unlet b:current_syntax
+
+if !exists("c_autodoc")
+ " For embedded Autodoc documentation
+ syn include @cmodAutodoc <sfile>:p:h/autodoc.vim
+ unlet b:current_syntax
+endif
+
+" Supports rotating amongst several same-level preprocessor conditionals
+packadd! matchit
+let b:match_words = "({:}\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>"
+
+" Cmod extensions
+syn keyword cmodStatement __INIT INIT EXIT GC_RECURSE GC_CHECK
+syn keyword cmodStatement EXTRA OPTIMIZE RETURN
+syn keyword cmodStatement ADD_EFUN ADD_EFUN2 ADD_FUNCTION
+syn keyword cmodStatement MK_STRING MK_STRING_SVALUE CONSTANT_STRLEN
+
+syn keyword cmodStatement SET_SVAL pop_n_elems pop_stack
+syn keyword cmodStatement SIMPLE_ARG_TYPE_ERROR Pike_sp Pike_fp MKPCHARP
+syn keyword cmodStatement SET_SVAL_TYPE REF_MAKE_CONST_STRING INC_PCHARP
+syn keyword cmodStatement PTR_FROM_INT INHERIT_FROM_PTR
+syn keyword cmodStatement DECLARE_CYCLIC BEGIN_CYCLIC END_CYCLIC
+syn keyword cmodStatement UPDATE_LOCATION UNSAFE_IS_ZERO SAFE_IS_ZERO
+syn keyword cmodStatement MKPCHARP_STR APPLY_MASTER current_storage
+syn keyword cmodStatement PIKE_MAP_VARIABLE size_shift
+syn keyword cmodStatement THREADS_ALLOW THREADS_DISALLOW
+
+syn keyword cmodStatement add_integer_constant ref_push_object
+syn keyword cmodStatement push_string apply_svalue free_svalue
+syn keyword cmodStatement get_inherit_storage get_storage
+syn keyword cmodStatement make_shared_binary_string push_int64
+syn keyword cmodStatement begin_shared_string end_shared_string
+syn keyword cmodStatement add_ref fast_clone_object clone_object
+syn keyword cmodStatement push_undefined push_int ref_push_string
+syn keyword cmodStatement free_string push_ulongest free_object
+syn keyword cmodStatement convert_stack_top_to_bignum push_array
+syn keyword cmodStatement push_object reduce_stack_top_bignum
+syn keyword cmodStatement push_static_text apply_current
+syn keyword cmodStatement assign_svalue free_program destruct_object
+syn keyword cmodStatement start_new_program low_inherit stack_swap
+syn keyword cmodStatement generic_error_program end_program
+syn keyword cmodStatement free_array apply_external copy_mapping
+syn keyword cmodStatement push_constant_text ref_push_mapping
+syn keyword cmodStatement mapping_insert mapping_string_insert_string
+syn keyword cmodStatement f_aggregate_mapping f_aggregate apply
+syn keyword cmodStatement push_mapping push_svalue low_mapping_lookup
+syn keyword cmodStatement assign_svalues_no_free f_add
+syn keyword cmodStatement push_empty_string stack_dup assign_lvalue
+syn keyword cmodStatement low_mapping_string_lookup allocate_mapping
+syn keyword cmodStatement copy_shared_string make_shared_binary_string0
+syn keyword cmodStatement f_call_function f_index f_utf8_to_string
+syn keyword cmodStatement finish_string_builder init_string_builder
+syn keyword cmodStatement reset_string_builder free_string_builder
+syn keyword cmodStatement string_builder_putchar get_all_args
+syn keyword cmodStatement add_shared_strings check_all_args
+syn keyword cmodStatement do_inherit add_string_constant
+syn keyword cmodStatement add_program_constant set_init_callback
+syn keyword cmodStatement simple_mapping_string_lookup
+syn keyword cmodStatement f_sprintf push_text string_has_null
+syn keyword cmodStatement end_and_resize_shared_string
+
+syn keyword cmodStatement args sp
+
+syn keyword cmodStatement free
+
+syn keyword cmodConstant ID_PROTECTED ID_FINAL PIKE_DEBUG
+syn keyword cmodConstant NUMBER_NUMBER
+syn keyword cmodConstant PIKE_T_INT PIKE_T_STRING PIKE_T_ARRAY
+syn keyword cmodConstant PIKE_T_MULTISET PIKE_T_OBJECT PIKE_T_MAPPING
+syn keyword cmodConstant NUMBER_UNDEFINED PIKE_T_PROGRAM PIKE_T_FUNCTION
+syn keyword cmodConstant T_OBJECT T_STRING T_ARRAY T_MAPPING
+
+syn keyword cmodException SET_ONERROR UNSET_ONERROR ONERROR
+syn keyword cmodException CALL_AND_UNSET_ONERROR
+
+syn keyword cmodDebug Pike_fatal Pike_error check_stack
+
+syn keyword cmodAccess public protected private INHERIT
+syn keyword cmodAccess CTYPE CVAR PIKEVAR PIKEFUN
+
+syn keyword cmodModifier efun export flags optflags optfunc
+syn keyword cmodModifier type rawtype errname name c_name prototype
+syn keyword cmodModifier program_flags gc_trivial PMOD_EXPORT
+syn keyword cmodModifier ATTRIBUTE noclone noinline
+syn keyword cmodModifier tOr tFuncV tInt tMix tVoid tStr tMap tPrg
+syn keyword cmodModifier tSetvar tArr tMult tMultiset
+syn keyword cmodModifier tArray tMapping tString tSetvar tVar
+
+syn keyword cmodType bool mapping string multiset array mixed
+syn keyword cmodType object function program auto svalue
+syn keyword cmodType bignum longest zero pike_string
+syn keyword cmodType this this_program THIS INT_TYPE INT64 INT32
+syn keyword cmodType p_wchar2 PCHARP p_wchar1 p_wchar0 MP_INT
+
+syn keyword cmodOperator _destruct create __hash _sizeof _indices _values
+syn keyword cmodOperator _is_type _sprintf _equal _m_delete _get_iterator
+syn keyword cmodOperator _search _types _serialize _deserialize
+syn keyword cmodOperator _size_object _random _sqrt TYPEOF SUBTYPEOF
+syn keyword cmodOperator LIKELY UNLIKELY
+
+syn keyword cmodStructure DECLARATIONS PIKECLASS DECLARE_STORAGE
+
+if !exists("c_autodoc")
+ syn match cmodAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cmodAutodoc containedin=cComment,cCommentL
+ syn cluster cCommentGroup add=cmodAutodocReal
+ syn cluster cPreProcGroup add=cmodAutodocReal
+endif
+
+" Default highlighting
+hi def link cmodAccess Statement
+hi def link cmodOperator Operator
+hi def link cmodStatement Statement
+hi def link cmodConstant Constant
+hi def link cmodModifier Type
+hi def link cmodType Type
+hi def link cmodStorageClass StorageClass
+hi def link cmodStructure Structure
+hi def link cmodException Exception
+hi def link cmodDebug Debug
+
+let b:current_syntax = "cmod"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+" vim: ts=8
diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim
index 3a343dd43..461ffb41f 100644
--- a/runtime/syntax/nsis.vim
+++ b/runtime/syntax/nsis.vim
@@ -1,52 +1,72 @@
" Vim syntax file
-" Language: NSIS script, for version of NSIS 1.91 and later
-" Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt>
-" Last Change: 2004 May 12
+" Language: NSIS script, for version of NSIS 3.02 and later
+" Maintainer: Ken Takata
+" URL: https://github.com/k-takata/vim-nsis
+" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt>
+" Last Change: 2018-01-26
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
syn case ignore
-"COMMENTS
+"Pseudo definitions
+syn match nsisLine nextgroup=@nsisPseudoStatement skipwhite "^"
+syn cluster nsisPseudoStatement contains=nsisFirstComment,nsisLocalLabel,nsisGlobalLabel
+syn cluster nsisPseudoStatement add=nsisDefine,nsisPreCondit,nsisMacro,nsisInclude,nsisSystem
+syn cluster nsisPseudoStatement add=nsisAttribute,nsisCompiler,nsisVersionInfo,nsisInstruction,nsisStatement
+
+"COMMENTS (4.1)
syn keyword nsisTodo todo attention note fixme readme
-syn region nsisComment start=";" end="$" contains=nsisTodo
-syn region nsisComment start="#" end="$" contains=nsisTodo
-
-"LABELS
-syn match nsisLocalLabel "\a\S\{-}:"
-syn match nsisGlobalLabel "\.\S\{-1,}:"
-
-"PREPROCESSOR
-syn match nsisPreprocSubst "${.\{-}}"
-syn match nsisDefine "!define\>"
-syn match nsisDefine "!undef\>"
-syn match nsisPreCondit "!ifdef\>"
-syn match nsisPreCondit "!ifndef\>"
-syn match nsisPreCondit "!endif\>"
-syn match nsisPreCondit "!else\>"
-syn match nsisMacro "!macro\>"
-syn match nsisMacro "!macroend\>"
-syn match nsisMacro "!insertmacro\>"
-
-"COMPILER UTILITY
-syn match nsisInclude "!include\>"
-syn match nsisSystem "!cd\>"
-syn match nsisSystem "!system\>"
-syn match nsisSystem "!packhdr\>"
-
-"VARIABLES
+syn region nsisComment start="[;#]" end="$" contains=nsisTodo,nsisLineContinuation,@Spell oneline
+syn region nsisComment start=".\@1<=/\*" end="\*/" contains=nsisTodo,@Spell
+syn region nsisFirstComment start="/\*" end="\*/" contained contains=nsisTodo,@Spell skipwhite
+ \ nextgroup=@nsisPseudoStatement
+
+syn match nsisLineContinuation "\\$"
+
+"STRINGS (4.1)
+syn region nsisString start=/"/ end=/"/ contains=@nsisStringItems,@Spell
+syn region nsisString start=/'/ end=/'/ contains=@nsisStringItems,@Spell
+syn region nsisString start=/`/ end=/`/ contains=@nsisStringItems,@Spell
+
+syn cluster nsisStringItems contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisRegistry,nsisLineContinuation
+
+"NUMBERS (4.1)
+syn match nsisNumber "\<[1-9]\d*\>"
+syn match nsisNumber "\<0x\x\+\>"
+syn match nsisNumber "\<0\o*\>"
+
+"STRING REPLACEMENT (5.4, 4.9.15.2, 5.3.1)
+syn region nsisPreprocSubst start="\${" end="}" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
+syn region nsisPreprocLangStr start="\$(" end=")" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
+syn region nsisPreprocEnvVar start="\$%" end="%" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
+
+"VARIABLES (4.2.2)
syn match nsisUserVar "$\d"
syn match nsisUserVar "$R\d"
syn match nsisSysVar "$INSTDIR"
syn match nsisSysVar "$OUTDIR"
syn match nsisSysVar "$CMDLINE"
+syn match nsisSysVar "$LANGUAGE"
+"CONSTANTS (4.2.3)
syn match nsisSysVar "$PROGRAMFILES"
+syn match nsisSysVar "$PROGRAMFILES32"
+syn match nsisSysVar "$PROGRAMFILES64"
+syn match nsisSysVar "$COMMONFILES"
+syn match nsisSysVar "$COMMONFILES32"
+syn match nsisSysVar "$COMMONFILES64"
syn match nsisSysVar "$DESKTOP"
syn match nsisSysVar "$EXEDIR"
+syn match nsisSysVar "$EXEFILE"
+syn match nsisSysVar "$EXEPATH"
+syn match nsisSysVar "${NSISDIR}"
syn match nsisSysVar "$WINDIR"
syn match nsisSysVar "$SYSDIR"
syn match nsisSysVar "$TEMP"
@@ -54,170 +74,513 @@ syn match nsisSysVar "$STARTMENU"
syn match nsisSysVar "$SMPROGRAMS"
syn match nsisSysVar "$SMSTARTUP"
syn match nsisSysVar "$QUICKLAUNCH"
+syn match nsisSysVar "$DOCUMENTS"
+syn match nsisSysVar "$SENDTO"
+syn match nsisSysVar "$RECENT"
+syn match nsisSysVar "$FAVORITES"
+syn match nsisSysVar "$MUSIC"
+syn match nsisSysVar "$PICTURES"
+syn match nsisSysVar "$VIDEOS"
+syn match nsisSysVar "$NETHOOD"
+syn match nsisSysVar "$FONTS"
+syn match nsisSysVar "$TEMPLATES"
+syn match nsisSysVar "$APPDATA"
+syn match nsisSysVar "$LOCALAPPDATA"
+syn match nsisSysVar "$PRINTHOOD"
+syn match nsisSysVar "$INTERNET_CACHE"
+syn match nsisSysVar "$COOKIES"
+syn match nsisSysVar "$HISTORY"
+syn match nsisSysVar "$PROFILE"
+syn match nsisSysVar "$ADMINTOOLS"
+syn match nsisSysVar "$RESOURCES"
+syn match nsisSysVar "$RESOURCES_LOCALIZED"
+syn match nsisSysVar "$CDBURN_AREA"
syn match nsisSysVar "$HWNDPARENT"
+syn match nsisSysVar "$PLUGINSDIR"
syn match nsisSysVar "$\\r"
syn match nsisSysVar "$\\n"
+syn match nsisSysVar "$\\t"
syn match nsisSysVar "$\$"
+syn match nsisSysVar "$\\["'`]"
-"STRINGS
-syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry
-syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry
-syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry
+"LABELS (4.3)
+syn match nsisLocalLabel contained "[^-+!$0-9;#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
+syn match nsisGlobalLabel contained "\.[^-+!$0-9;# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
"CONSTANTS
-syn keyword nsisBoolean true false on off
-
-syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog
-syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all
-syn keyword nsisAttribOptions zlib bzip2 lzma
-
-syn match nsisAttribOptions '\/NOCUSTOM'
-syn match nsisAttribOptions '\/CUSTOMSTRING'
-syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM'
-syn match nsisAttribOptions '\/windows'
-syn match nsisAttribOptions '\/r'
-syn match nsisAttribOptions '\/oname'
-syn match nsisAttribOptions '\/REBOOTOK'
-syn match nsisAttribOptions '\/SILENT'
-syn match nsisAttribOptions '\/FILESONLY'
-syn match nsisAttribOptions '\/SHORT'
-
-syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED
-
-syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD
-syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS
-syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA
-
-syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY
-syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN
-syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM
-syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY
-
-syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL
-syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP
-syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT
-syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4
-syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES
-
-syn match nsisNumber "\<[^0]\d*\>"
-syn match nsisNumber "\<0x\x\+\>"
-syn match nsisNumber "\<0\o*\>"
+syn keyword nsisBoolean contained true false
+syn keyword nsisOnOff contained on off
+
+syn keyword nsisRegistry contained HKCR HKLM HKCU HKU HKCC HKDD HKPD SHCTX
+syn keyword nsisRegistry contained HKCR32 HKCR64 HKCU32 HKCU64 HKLM32 HKLM64
+syn keyword nsisRegistry contained HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS
+syn keyword nsisRegistry contained HKEY_CLASSES_ROOT32 HKEY_CLASSES_ROOT64
+syn keyword nsisRegistry contained HKEY_CURRENT_USER32 HKEY_CURRENT_USER64
+syn keyword nsisRegistry contained HKEY_LOCAL_MACHINE32 HKEY_LOCAL_MACHINE64
+syn keyword nsisRegistry contained HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA
+syn keyword nsisRegistry contained SHELL_CONTEXT
+
+
+" common options
+syn cluster nsisAnyOpt contains=nsisComment,nsisLineContinuation,nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisString,nsisNumber
+syn region nsisBooleanOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBoolean
+syn region nsisOnOffOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisOnOff
+syn region nsisLangOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLangKwd
+syn match nsisLangKwd contained "/LANG\>"
+syn region nsisFontOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFontKwd
+syn match nsisFontKwd contained "/\%(ITALIC\|UNDERLINE\|STRIKE\)\>"
+
+"STATEMENTS - pages (4.5)
+syn keyword nsisStatement contained Page UninstPage nextgroup=nsisPageOpt skipwhite
+syn region nsisPageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageKwd
+syn keyword nsisPageKwd contained custom license components directory instfiles uninstConfirm
+syn match nsisPageKwd contained "/ENABLECANCEL\>"
+
+syn keyword nsisStatement contained PageEx nextgroup=nsisPageExOpt skipwhite
+syn region nsisPageExOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageExKwd
+syn match nsisPageExKwd contained "\<\%(un\.\)\?\%(custom\|license\|components\|directory\|instfiles\|uninstConfirm\)\>"
+
+syn keyword nsisStatement contained PageExEnd PageCallbacks
+
+"STATEMENTS - sections (4.6.1)
+syn keyword nsisStatement contained AddSize SectionEnd SectionGroupEnd
+
+syn keyword nsisStatement contained Section nextgroup=nsisSectionOpt skipwhite
+syn region nsisSectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionKwd
+syn match nsisSectionKwd contained "/o\>"
+
+syn keyword nsisStatement contained SectionIn nextgroup=nsisSectionInOpt skipwhite
+syn region nsisSectionInOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionInKwd
+syn keyword nsisSectionInKwd contained RO
+
+syn keyword nsisStatement contained SectionGroup nextgroup=nsisSectionGroupOpt skipwhite
+syn region nsisSectionGroupOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionGroupKwd
+syn match nsisSectionGroupKwd contained "/e\>"
+
+"STATEMENTS - functions (4.7.1)
+syn keyword nsisStatement contained Function FunctionEnd
+
+
+"STATEMENTS - LogicLib.nsh
+syn match nsisStatement "${If}"
+syn match nsisStatement "${IfNot}"
+syn match nsisStatement "${Unless}"
+syn match nsisStatement "${ElseIf}"
+syn match nsisStatement "${ElseIfNot}"
+syn match nsisStatement "${ElseUnless}"
+syn match nsisStatement "${Else}"
+syn match nsisStatement "${EndIf}"
+syn match nsisStatement "${EndUnless}"
+syn match nsisStatement "${AndIf}"
+syn match nsisStatement "${AndIfNot}"
+syn match nsisStatement "${AndUnless}"
+syn match nsisStatement "${OrIf}"
+syn match nsisStatement "${OrIfNot}"
+syn match nsisStatement "${OrUnless}"
+syn match nsisStatement "${IfThen}"
+syn match nsisStatement "${IfNotThen}"
+syn match nsisStatement "${||\?}" nextgroup=@nsisPseudoStatement skipwhite
+syn match nsisStatement "${IfCmd}" nextgroup=@nsisPseudoStatement skipwhite
+syn match nsisStatement "${Select}"
+syn match nsisStatement "${Case}"
+syn match nsisStatement "${Case[2-5]}"
+syn match nsisStatement "${CaseElse}"
+syn match nsisStatement "${Default}"
+syn match nsisStatement "${EndSelect}"
+syn match nsisStatement "${Switch}"
+syn match nsisStatement "${EndSwitch}"
+syn match nsisStatement "${Break}"
+syn match nsisStatement "${Do}"
+syn match nsisStatement "${DoWhile}"
+syn match nsisStatement "${DoUntil}"
+syn match nsisStatement "${ExitDo}"
+syn match nsisStatement "${Continue}"
+syn match nsisStatement "${Loop}"
+syn match nsisStatement "${LoopWhile}"
+syn match nsisStatement "${LoopUntil}"
+syn match nsisStatement "${For}"
+syn match nsisStatement "${ForEach}"
+syn match nsisStatement "${ExitFor}"
+syn match nsisStatement "${Next}"
+"STATEMENTS - Memento.nsh
+syn match nsisStatement "${MementoSection}"
+syn match nsisStatement "${MementoSectionEnd}"
+
+
+"USER VARIABLES (4.2.1)
+syn keyword nsisInstruction contained Var nextgroup=nsisVarOpt skipwhite
+syn region nsisVarOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVarKwd
+syn match nsisVarKwd contained "/GLOBAL\>"
+
+"INSTALLER ATTRIBUTES (4.8.1)
+syn keyword nsisAttribute contained Caption ChangeUI CheckBitmap CompletedText ComponentText
+syn keyword nsisAttribute contained DetailsButtonText DirText DirVar
+syn keyword nsisAttribute contained FileErrorText Icon InstallButtonText
+syn keyword nsisAttribute contained InstallDir InstProgressFlags
+syn keyword nsisAttribute contained LicenseData LicenseText
+syn keyword nsisAttribute contained MiscButtonText Name OutFile
+syn keyword nsisAttribute contained SpaceTexts SubCaption UninstallButtonText UninstallCaption
+syn keyword nsisAttribute contained UninstallIcon UninstallSubCaption UninstallText
+
+syn keyword nsisAttribute contained AddBrandingImage nextgroup=nsisAddBrandingImageOpt skipwhite
+syn region nsisAddBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddBrandingImageKwd
+syn keyword nsisAddBrandingImageKwd contained left right top bottom width height
+
+syn keyword nsisAttribute contained nextgroup=nsisBooleanOpt skipwhite
+ \ AllowRootDirInstall AutoCloseWindow
+
+syn keyword nsisAttribute contained BGFont nextgroup=nsisFontOpt skipwhite
+
+syn keyword nsisAttribute contained BGGradient nextgroup=nsisBGGradientOpt skipwhite
+syn region nsisBGGradientOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBGGradientKwd
+syn keyword nsisBGGradientKwd contained off
+
+syn keyword nsisAttribute contained BrandingText nextgroup=nsisBrandingTextOpt skipwhite
+syn region nsisBrandingTextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBrandingTextKwd
+syn match nsisBrandingTextKwd contained "/TRIM\%(LEFT\|RIGHT\|CENTER\)\>"
+
+syn keyword nsisAttribute contained CRCCheck nextgroup=nsisCRCCheckOpt skipwhite
+syn region nsisCRCCheckOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCRCCheckKwd
+syn keyword nsisCRCCheckKwd contained on off force
+
+syn keyword nsisAttribute contained DirVerify nextgroup=nsisDirVerifyOpt skipwhite
+syn region nsisDirVerifyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDirVerifyKwd
+syn keyword nsisDirVerifyKwd contained auto leave
+
+syn keyword nsisAttribute contained InstallColors nextgroup=nsisInstallColorsOpt skipwhite
+syn region nsisInstallColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstallColorsKwd
+syn match nsisInstallColorsKwd contained "/windows\>"
+
+syn keyword nsisAttribute contained InstallDirRegKey nextgroup=nsisRegistryOpt skipwhite
+
+syn keyword nsisAttribute contained InstType nextgroup=nsisInstTypeOpt skipwhite
+syn region nsisInstTypeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstTypeKwd
+syn match nsisInstTypeKwd contained "/\%(NOCUSTOM\|CUSTOMSTRING\|COMPONENTSONLYONCUSTOM\)\>"
+
+syn keyword nsisAttribute contained LicenseBkColor nextgroup=nsisLicenseBkColorOpt skipwhite
+syn region nsisLicenseBkColorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseBkColorKwd
+syn match nsisLicenseBkColorKwd contained "/\%(gray\|windows\)\>"
+
+syn keyword nsisAttribute contained LicenseForceSelection nextgroup=nsisLicenseForceSelectionOpt skipwhite
+syn region nsisLicenseForceSelectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseForceSelectionKwd
+syn keyword nsisLicenseForceSelectionKwd contained checkbox radiobuttons off
+
+syn keyword nsisAttribute contained ManifestDPIAware nextgroup=nsisManifestDPIAwareOpt skipwhite
+syn region nsisManifestDPIAwareOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestDPIAwareKwd
+syn keyword nsisManifestDPIAwareKwd contained notset true false
+
+syn keyword nsisAttribute contained ManifestSupportedOS nextgroup=nsisManifestSupportedOSOpt skipwhite
+syn region nsisManifestSupportedOSOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestSupportedOSKwd
+syn match nsisManifestSupportedOSKwd contained "\<\%(none\|all\|WinVista\|Win7\|Win8\|Win8\.1\|Win10\)\>"
+
+syn keyword nsisAttribute contained RequestExecutionLevel nextgroup=nsisRequestExecutionLevelOpt skipwhite
+syn region nsisRequestExecutionLevelOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRequestExecutionLevelKwd
+syn keyword nsisRequestExecutionLevelKwd contained none user highest admin
+
+syn keyword nsisAttribute contained SetFont nextgroup=nsisLangOpt skipwhite
+
+syn keyword nsisAttribute contained nextgroup=nsisShowInstDetailsOpt skipwhite
+ \ ShowInstDetails ShowUninstDetails
+syn region nsisShowInstDetailsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisShowInstDetailsKwd
+syn keyword nsisShowInstDetailsKwd contained hide show nevershow
+
+syn keyword nsisAttribute contained SilentInstall nextgroup=nsisSilentInstallOpt skipwhite
+syn region nsisSilentInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentInstallKwd
+syn keyword nsisSilentInstallKwd contained normal silent silentlog
+
+syn keyword nsisAttribute contained SilentUnInstall nextgroup=nsisSilentUnInstallOpt skipwhite
+syn region nsisSilentUnInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentUnInstallKwd
+syn keyword nsisSilentUnInstallKwd contained normal silent
+
+syn keyword nsisAttribute contained nextgroup=nsisOnOffOpt skipwhite
+ \ WindowIcon XPStyle
+
+"COMPILER FLAGS (4.8.2)
+syn keyword nsisCompiler contained nextgroup=nsisOnOffOpt skipwhite
+ \ AllowSkipFiles SetDatablockOptimize SetDateSave
+
+syn keyword nsisCompiler contained FileBufSize SetCompressorDictSize
+
+syn keyword nsisCompiler contained SetCompress nextgroup=nsisSetCompressOpt skipwhite
+syn region nsisSetCompressOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressKwd
+syn keyword nsisSetCompressKwd contained auto force off
+
+syn keyword nsisCompiler contained SetCompressor nextgroup=nsisSetCompressorOpt skipwhite
+syn region nsisSetCompressorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressorKwd
+syn keyword nsisSetCompressorKwd contained zlib bzip2 lzma
+syn match nsisSetCompressorKwd contained "/\%(SOLID\|FINAL\)"
+
+syn keyword nsisCompiler contained SetOverwrite nextgroup=nsisSetOverwriteOpt skipwhite
+syn region nsisSetOverwriteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetOverwriteKwd
+syn keyword nsisSetOverwriteKwd contained on off try ifnewer ifdiff lastused
+
+syn keyword nsisCompiler contained Unicode nextgroup=nsisBooleanOpt skipwhite
+
+"VERSION INFORMATION (4.8.3)
+syn keyword nsisVersionInfo contained VIAddVersionKey nextgroup=nsisLangOpt skipwhite
+
+syn keyword nsisVersionInfo contained VIProductVersion VIFileVersion
+
+
+"FUNCTIONS - basic (4.9.1)
+syn keyword nsisInstruction contained Delete Rename nextgroup=nsisDeleteOpt skipwhite
+syn region nsisDeleteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteKwd
+syn match nsisDeleteKwd contained "/REBOOTOK\>"
+
+syn keyword nsisInstruction contained Exec ExecWait SetOutPath
+
+syn keyword nsisInstruction contained ExecShell ExecShellWait nextgroup=nsisExecShellOpt skipwhite
+syn region nsisExecShellOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisExecShellKwd
+syn keyword nsisExecShellKwd contained SW_SHOWDEFAULT SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_HIDE
+syn match nsisExecShellKwd contained "/INVOKEIDLIST\>"
+
+syn keyword nsisInstruction contained File nextgroup=nsisFileOpt skipwhite
+syn region nsisFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileKwd
+syn match nsisFileKwd contained "/\%(nonfatal\|[arx]\|oname\)\>"
+
+syn keyword nsisInstruction contained ReserveFile nextgroup=nsisReserveFileOpt skipwhite
+syn region nsisReserveFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisReserveFileKwd
+syn match nsisReserveFileKwd contained "/\%(nonfatal\|[rx]\|plugin\)\>"
+
+syn keyword nsisInstruction contained RMDir nextgroup=nsisRMDirOpt skipwhite
+syn region nsisRMDirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRMDirKwd
+syn match nsisRMDirKwd contained "/\%(REBOOTOK\|r\)\>"
+
+"FUNCTIONS - registry & ini (4.9.2)
+syn keyword nsisInstruction contained DeleteINISec DeleteINIStr FlushINI ReadINIStr WriteINIStr
+syn keyword nsisInstruction contained ExpandEnvStrings ReadEnvStr
-"INSTALLER ATTRIBUTES - General installer configuration
-syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon
-syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall
-syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText
+syn keyword nsisInstruction contained DeleteRegKey nextgroup=nsisDeleteRegKeyOpt skipwhite
+syn region nsisDeleteRegKeyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteRegKeyKwd,nsisRegistry
+syn match nsisDeleteRegKeyKwd contained "/ifempty\>"
-"INSTALLER ATTRIBUTES - Install directory configuration
-syn keyword nsisAttribute InstallDir InstallDirRegKey
+syn keyword nsisInstruction contained nextgroup=nsisRegistryOpt skipwhite
+ \ DeleteRegValue EnumRegKey EnumRegValue ReadRegDWORD ReadRegStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr
+syn region nsisRegistryOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry
-"INSTALLER ATTRIBUTES - License page configuration
-syn keyword nsisAttribute LicenseText LicenseData
+syn keyword nsisInstruction contained WriteRegMultiStr nextgroup=nsisWriteRegMultiStrOpt skipwhite
+syn region nsisWriteRegMultiStrOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry,nsisWriteRegMultiStrKwd
+syn match nsisWriteRegMultiStrKwd contained "/REGEDIT5\>"
-"INSTALLER ATTRIBUTES - Component page configuration
-syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts
+syn keyword nsisInstruction contained SetRegView nextgroup=nsisSetRegViewOpt skipwhite
+syn region nsisSetRegViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetRegViewKwd
+syn keyword nsisSetRegViewKwd contained default lastused
-"INSTALLER ATTRIBUTES - Directory page configuration
-syn keyword nsisAttribute DirShow DirText AllowRootDirInstall
+"FUNCTIONS - general purpose (4.9.3)
+syn keyword nsisInstruction contained CallInstDLL CreateDirectory GetDLLVersion
+syn keyword nsisInstruction contained GetDLLVersionLocal GetFileTime GetFileTimeLocal
+syn keyword nsisInstruction contained GetTempFileName SearchPath RegDLL UnRegDLL
-"INSTALLER ATTRIBUTES - Install page configuration
-syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow
-syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText
+syn keyword nsisInstruction contained CopyFiles nextgroup=nsisCopyFilesOpt skipwhite
+syn region nsisCopyFilesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCopyFilesKwd
+syn match nsisCopyFilesKwd contained "/\%(SILENT\|FILESONLY\)\>"
-"INSTALLER ATTRIBUTES - Uninstall configuration
-syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption
-syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText
+syn keyword nsisInstruction contained CreateShortcut nextgroup=nsisCreateShortcutOpt skipwhite
+syn region nsisCreateShortcutOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCreateShortcutKwd
+syn match nsisCreateShortcutKwd contained "/NoWorkingDir\>"
-"COMPILER ATTRIBUTES
-syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave
+syn keyword nsisInstruction contained GetFullPathName nextgroup=nsisGetFullPathNameOpt skipwhite
+syn region nsisGetFullPathNameOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetFullPathNameKwd
+syn match nsisGetFullPathNameKwd contained "/SHORT\>"
+syn keyword nsisInstruction contained SetFileAttributes nextgroup=nsisSetFileAttributesOpt skipwhite
+syn region nsisSetFileAttributesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileAttrib
+syn keyword nsisFileAttrib contained NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY
+syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN
+syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM
+syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_TEMPORARY
-"FUNCTIONS - general purpose
-syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell
-syn keyword nsisInstruction Rename Delete RMDir
+"FUNCTIONS - Flow Control (4.9.4)
+syn keyword nsisInstruction contained Abort Call ClearErrors GetCurrentAddress
+syn keyword nsisInstruction contained GetFunctionAddress GetLabelAddress Goto
+syn keyword nsisInstruction contained IfAbort IfErrors IfFileExists IfRebootFlag IfSilent
+syn keyword nsisInstruction contained IntCmp IntCmpU Return Quit SetErrors StrCmp StrCmpS
-"FUNCTIONS - registry & ini
-syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin
-syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr
-syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey
-syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr
+syn keyword nsisInstruction contained MessageBox nextgroup=nsisMessageBoxOpt skipwhite
+syn region nsisMessageBoxOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisMessageBox
+syn keyword nsisMessageBox contained MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL
+syn keyword nsisMessageBox contained MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_USERICON
+syn keyword nsisMessageBox contained MB_TOPMOST MB_SETFOREGROUND MB_RIGHT MB_RTLREADING
+syn keyword nsisMessageBox contained MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4
+syn keyword nsisMessageBox contained IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES
+syn match nsisMessageBox contained "/SD\>"
-"FUNCTIONS - general purpose, advanced
-syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut
-syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL
-syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal
-syn keyword nsisInstruction GetFileTime GetFileTimeLocal
+"FUNCTIONS - File and directory i/o instructions (4.9.5)
+syn keyword nsisInstruction contained FileClose FileOpen FileRead FileReadUTF16LE
+syn keyword nsisInstruction contained FileReadByte FileReadWord FileSeek FileWrite
+syn keyword nsisInstruction contained FileWriteByte FileWriteWord
+syn keyword nsisInstruction contained FindClose FindFirst FindNext
-"FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions
-syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow
-syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp
-syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress
-syn keyword nsisInstruction GetCurrentAddress
+syn keyword nsisInstruction contained FileWriteUTF16LE nextgroup=nsisFileWriteUTF16LEOpt skipwhite
+syn region nsisFileWriteUTF16LEOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileWriteUTF16LEKwd
+syn match nsisFileWriteUTF16LEKwd contained "/BOM\>"
-"FUNCTIONS - File and directory i/o instructions
-syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead
-syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek
+"FUNCTIONS - Uninstaller instructions (4.9.6)
+syn keyword nsisInstruction contained WriteUninstaller
-"FUNCTIONS - Misc instructions
-syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint
-syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext
+"FUNCTIONS - Misc instructions (4.9.7)
+syn keyword nsisInstruction contained GetErrorLevel GetInstDirError InitPluginsDir Nop
+syn keyword nsisInstruction contained SetErrorLevel Sleep
-"FUNCTIONS - String manipulation support
-syn keyword nsisInstruction StrCpy StrLen
+syn keyword nsisInstruction contained SetShellVarContext nextgroup=nsisSetShellVarContextOpt skipwhite
+syn region nsisSetShellVarContextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetShellVarContextKwd
+syn keyword nsisSetShellVarContextKwd contained current all
-"FUNCTIONS - Stack support
-syn keyword nsisInstruction Push Pop Exch
+"FUNCTIONS - String manipulation support (4.9.8)
+syn keyword nsisInstruction contained StrCpy StrLen
-"FUNCTIONS - Integer manipulation support
-syn keyword nsisInstruction IntOp IntFmt
+"FUNCTIONS - Stack support (4.9.9)
+syn keyword nsisInstruction contained Exch Push Pop
-"FUNCTIONS - Rebooting support
-syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag
+"FUNCTIONS - Integer manipulation support (4.9.10)
+syn keyword nsisInstruction contained IntOp IntFmt
-"FUNCTIONS - Uninstaller instructions
-syn keyword nsisInstruction WriteUninstaller
+"FUNCTIONS - Rebooting support (4.9.11)
+syn keyword nsisInstruction contained Reboot SetRebootFlag
-"FUNCTIONS - Install logging instructions
-syn keyword nsisInstruction LogSet LogText
+"FUNCTIONS - Install logging instructions (4.9.12)
+syn keyword nsisInstruction contained LogSet nextgroup=nsisOnOffOpt skipwhite
+syn keyword nsisInstruction contained LogText
-"FUNCTIONS - Section management instructions
-syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText
-syn keyword nsisInstruction SectionGetText
+"FUNCTIONS - Section management instructions (4.9.13)
+syn keyword nsisInstruction contained SectionSetFlags SectionGetFlags SectionSetText
+syn keyword nsisInstruction contained SectionGetText SectionSetInstTypes SectionGetInstTypes
+syn keyword nsisInstruction contained SectionSetSize SectionGetSize SetCurInstType GetCurInstType
+syn keyword nsisInstruction contained InstTypeSetText InstTypeGetText
+"FUNCTIONS - User Interface Instructions (4.9.14)
+syn keyword nsisInstruction contained BringToFront DetailPrint EnableWindow
+syn keyword nsisInstruction contained FindWindow GetDlgItem HideWindow IsWindow
+syn keyword nsisInstruction contained ShowWindow
-"SPECIAL FUNCTIONS - install
+syn keyword nsisInstruction contained CreateFont nextgroup=nsisFontOpt skipwhite
+
+syn keyword nsisInstruction contained nextgroup=nsisBooleanOpt skipwhite
+ \ LockWindow SetAutoClose
+
+syn keyword nsisInstruction contained SendMessage nextgroup=nsisSendMessageOpt skipwhite
+syn region nsisSendMessageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSendMessageKwd
+syn match nsisSendMessageKwd contained "/TIMEOUT\>"
+
+syn keyword nsisInstruction contained SetBrandingImage nextgroup=nsisSetBrandingImageOpt skipwhite
+syn region nsisSetBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetBrandingImageKwd
+syn match nsisSetBrandingImageKwd contained "/\%(IMGID\|RESIZETOFIT\)\>"
+
+syn keyword nsisInstruction contained SetDetailsView nextgroup=nsisSetDetailsViewOpt skipwhite
+syn region nsisSetDetailsViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsViewKwd
+syn keyword nsisSetDetailsViewKwd contained show hide
+
+syn keyword nsisInstruction contained SetDetailsPrint nextgroup=nsisSetDetailsPrintOpt skipwhite
+syn region nsisSetDetailsPrintOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsPrintKwd
+syn keyword nsisSetDetailsPrintKwd contained none listonly textonly both lastused
+
+syn keyword nsisInstruction contained SetCtlColors nextgroup=nsisSetCtlColorsOpt skipwhite
+syn region nsisSetCtlColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCtlColorsKwd
+syn match nsisSetCtlColorsKwd contained "/BRANDING\>"
+
+syn keyword nsisInstruction contained SetSilent nextgroup=nsisSetSilentOpt skipwhite
+syn region nsisSetSilentOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetSilentKwd
+syn keyword nsisSetSilentKwd contained silent normal
+
+
+"FUNCTIONS - Multiple Languages Instructions (4.9.15)
+syn keyword nsisInstruction contained LoadLanguageFile LangString LicenseLangString
+
+
+"SPECIAL FUNCTIONS - install (4.7.2.1)
+syn match nsisCallback "\.onGUIInit"
syn match nsisCallback "\.onInit"
-syn match nsisCallback "\.onUserAbort"
-syn match nsisCallback "\.onInstSuccess"
syn match nsisCallback "\.onInstFailed"
-syn match nsisCallback "\.onVerifyInstDir"
-syn match nsisCallback "\.onNextPage"
-syn match nsisCallback "\.onPrevPage"
+syn match nsisCallback "\.onInstSuccess"
+syn match nsisCallback "\.onGUIEnd"
+syn match nsisCallback "\.onMouseOverSection"
+syn match nsisCallback "\.onRebootFailed"
syn match nsisCallback "\.onSelChange"
+syn match nsisCallback "\.onUserAbort"
+syn match nsisCallback "\.onVerifyInstDir"
-"SPECIAL FUNCTIONS - uninstall
+"SPECIAL FUNCTIONS - uninstall (4.7.2.2)
+syn match nsisCallback "un\.onGUIInit"
syn match nsisCallback "un\.onInit"
+syn match nsisCallback "un\.onUninstFailed"
+syn match nsisCallback "un\.onUninstSuccess"
+syn match nsisCallback "un\.onGUIEnd"
+syn match nsisCallback "un\.onRebootFailed"
+syn match nsisCallback "un\.onSelChange"
syn match nsisCallback "un\.onUserAbort"
-syn match nsisCallback "un\.onInstSuccess"
-syn match nsisCallback "un\.onInstFailed"
-syn match nsisCallback "un\.onVerifyInstDir"
-syn match nsisCallback "un\.onNextPage"
-"STATEMENTS - sections
-syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider
-syn keyword nsisStatement AddSize
+"COMPILER UTILITY (5.1)
+syn match nsisInclude contained "!include\>" nextgroup=nsisIncludeOpt skipwhite
+syn region nsisIncludeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIncludeKwd
+syn match nsisIncludeKwd contained "/\%(NONFATAL\|CHARSET\)\>"
+
+syn match nsisSystem contained "!addincludedir\>"
+
+syn match nsisSystem contained "!addplugindir\>" nextgroup=nsisAddplugindirOpt skipwhite
+syn region nsisAddplugindirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddplugindirKwd
+syn match nsisAddplugindirKwd contained "/\%(x86-ansi\|x86-unicode\)\>"
+
+syn match nsisSystem contained "!appendfile\>" nextgroup=nsisAppendfileOpt skipwhite
+syn region nsisAppendfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAppendfileKwd
+syn match nsisAppendfileKwd contained "/\%(CHARSET\|RawNL\)\>"
+
+syn match nsisSystem contained "!cd\>"
+
+syn match nsisSystem contained "!delfile\>" nextgroup=nsisDelfileOpt skipwhite
+syn region nsisDelfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDelfileKwd
+syn match nsisDelfileKwd contained "/nonfatal\>"
+
+syn match nsisSystem contained "!echo\>"
+syn match nsisSystem contained "!error\>"
+syn match nsisSystem contained "!execute\>"
+syn match nsisSystem contained "!makensis\>"
+syn match nsisSystem contained "!packhdr\>"
+syn match nsisSystem contained "!finalize\>"
+syn match nsisSystem contained "!system\>"
+syn match nsisSystem contained "!tempfile\>"
+syn match nsisSystem contained "!getdllversion\>"
+syn match nsisSystem contained "!warning\>"
+
+syn match nsisSystem contained "!pragma\>" nextgroup=nsisPragmaOpt skipwhite
+syn region nsisPragmaOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPragmaKwd
+syn keyword nsisPragmaKwd contained enable disable default push pop
+
+syn match nsisSystem contained "!verbose\>" nextgroup=nsisVerboseOpt skipwhite
+syn region nsisVerboseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVerboseKwd
+syn keyword nsisVerboseKwd contained push pop
+
+"PREPROCESSOR (5.4)
+syn match nsisDefine contained "!define\>" nextgroup=nsisDefineOpt skipwhite
+syn region nsisDefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDefineKwd
+syn match nsisDefineKwd contained "/\%(ifndef\|redef\|date\|utcdate\|math\|file\)\>"
+
+syn match nsisDefine contained "!undef\>"
+syn match nsisPreCondit contained "!ifdef\>"
+syn match nsisPreCondit contained "!ifndef\>"
+
+syn match nsisPreCondit contained "!if\>" nextgroup=nsisIfOpt skipwhite
+syn region nsisIfOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIfKwd
+syn match nsisIfKwd contained "/FileExists\>"
-"STATEMENTS - functions
-syn keyword nsisStatement Function FunctionEnd
+syn match nsisPreCondit contained "!ifmacrodef\>"
+syn match nsisPreCondit contained "!ifmacrondef\>"
+syn match nsisPreCondit contained "!else\>"
+syn match nsisPreCondit contained "!endif\>"
+syn match nsisMacro contained "!insertmacro\>"
+syn match nsisMacro contained "!macro\>"
+syn match nsisMacro contained "!macroend\>"
+syn match nsisMacro contained "!macroundef\>"
-"STATEMENTS - pages
-syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks
+syn match nsisMacro contained "!searchparse\>" nextgroup=nsisSearchparseOpt skipwhite
+syn region nsisSearchparseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchparseKwd
+syn match nsisSearchparseKwd contained "/\%(ignorecase\|noerrors\|file\)\>"
+syn match nsisMacro contained "!searchreplace\>" nextgroup=nsisSearchreplaceOpt skipwhite
+syn region nsisSearchreplaceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchreplaceKwd
+syn match nsisSearchreplaceKwd contained "/ignorecase\>"
-"ERROR
-syn keyword nsisError UninstallExeName
" Define the default highlighting.
@@ -225,32 +588,93 @@ syn keyword nsisError UninstallExeName
hi def link nsisInstruction Function
hi def link nsisComment Comment
-hi def link nsisLocalLabel Label
+hi def link nsisFirstComment Comment
+hi def link nsisLocalLabel Label
hi def link nsisGlobalLabel Label
-hi def link nsisStatement Statement
+hi def link nsisStatement Statement
hi def link nsisString String
hi def link nsisBoolean Boolean
-hi def link nsisAttribOptions Constant
-hi def link nsisExecShell Constant
-hi def link nsisFileAttrib Constant
-hi def link nsisMessageBox Constant
-hi def link nsisRegistry Identifier
+hi def link nsisOnOff Boolean
+hi def link nsisFontKwd Constant
+hi def link nsisLangKwd Constant
+hi def link nsisPageKwd Constant
+hi def link nsisPageExKwd Constant
+hi def link nsisSectionKwd Constant
+hi def link nsisSectionInKwd Constant
+hi def link nsisSectionGroupKwd Constant
+hi def link nsisVarKwd Constant
+hi def link nsisAddBrandingImageKwd Constant
+hi def link nsisBGGradientKwd Constant
+hi def link nsisBrandingTextKwd Constant
+hi def link nsisCRCCheckKwd Constant
+hi def link nsisDirVerifyKwd Constant
+hi def link nsisInstallColorsKwd Constant
+hi def link nsisInstTypeKwd Constant
+hi def link nsisLicenseBkColorKwd Constant
+hi def link nsisLicenseForceSelectionKwd Constant
+hi def link nsisManifestDPIAwareKwd Constant
+hi def link nsisManifestSupportedOSKwd Constant
+hi def link nsisRequestExecutionLevelKwd Constant
+hi def link nsisShowInstDetailsKwd Constant
+hi def link nsisSilentInstallKwd Constant
+hi def link nsisSilentUnInstallKwd Constant
+hi def link nsisSetCompressKwd Constant
+hi def link nsisSetCompressorKwd Constant
+hi def link nsisSetOverwriteKwd Constant
+hi def link nsisDeleteKwd Constant
+hi def link nsisExecShellKwd Constant
+hi def link nsisFileKwd Constant
+hi def link nsisReserveFileKwd Constant
+hi def link nsisRMDirKwd Constant
+hi def link nsisDeleteRegKeyKwd Constant
+hi def link nsisWriteRegMultiStrKwd Constant
+hi def link nsisSetRegViewKwd Constant
+hi def link nsisCopyFilesKwd Constant
+hi def link nsisCreateShortcutKwd Constant
+hi def link nsisGetFullPathNameKwd Constant
+hi def link nsisFileAttrib Constant
+hi def link nsisMessageBox Constant
+hi def link nsisFileWriteUTF16LEKwd Constant
+hi def link nsisSetShellVarContextKwd Constant
+hi def link nsisSendMessageKwd Constant
+hi def link nsisSetBrandingImageKwd Constant
+hi def link nsisSetDetailsViewKwd Constant
+hi def link nsisSetDetailsPrintKwd Constant
+hi def link nsisSetCtlColorsKwd Constant
+hi def link nsisSetSilentKwd Constant
+hi def link nsisRegistry Identifier
hi def link nsisNumber Number
hi def link nsisError Error
hi def link nsisUserVar Identifier
hi def link nsisSysVar Identifier
-hi def link nsisAttribute Type
-hi def link nsisCompiler Type
+hi def link nsisAttribute Type
+hi def link nsisCompiler Type
+hi def link nsisVersionInfo Type
hi def link nsisTodo Todo
-hi def link nsisCallback Operator
+hi def link nsisCallback Identifier
" preprocessor commands
hi def link nsisPreprocSubst PreProc
+hi def link nsisPreprocLangStr PreProc
+hi def link nsisPreprocEnvVar PreProc
hi def link nsisDefine Define
hi def link nsisMacro Macro
-hi def link nsisPreCondit PreCondit
+hi def link nsisPreCondit PreCondit
hi def link nsisInclude Include
hi def link nsisSystem PreProc
+hi def link nsisLineContinuation Special
+hi def link nsisIncludeKwd Constant
+hi def link nsisAddplugindirKwd Constant
+hi def link nsisAppendfileKwd Constant
+hi def link nsisDelfileKwd Constant
+hi def link nsisPragmaKwd Constant
+hi def link nsisVerboseKwd Constant
+hi def link nsisDefineKwd Constant
+hi def link nsisIfKwd Constant
+hi def link nsisSearchparseKwd Constant
+hi def link nsisSearchreplaceKwd Constant
let b:current_syntax = "nsis"
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim
index ccd122c46..2c34cb4f3 100644
--- a/runtime/syntax/pike.vim
+++ b/runtime/syntax/pike.vim
@@ -1,59 +1,184 @@
" Vim syntax file
-" Language: Pike
-" Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it>
-" Last Change: 2001 May 10
+" Language: Pike
+" Maintainer: Stephen R. van den Berg <srb@cuci.nl>
+" Maintainer of previous implementation: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it>
+" Last Change: 2018 Jan 28
+" Version: 2.9
+" Remark: Derived from the C-syntax; fixed several bugs in the C-syntax
+" Remark: and extended it with the Pike syntax.
+" Remark: Includes a highlighter for all Pike types of parenthesis errors.
+" Remark: Includes a highlighter for SQL on multiline strings.
+" Remark: Includes a highlighter for any embedded Autodoc format.
-" quit when a syntax file was already loaded
+" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
-" A bunch of useful C keywords
-syn keyword pikeStatement goto break return continue
-syn keyword pikeLabel case default
-syn keyword pikeConditional if else switch
-syn keyword pikeRepeat while for foreach do
-syn keyword pikeStatement gauge destruct lambda inherit import typeof
-syn keyword pikeException catch
-syn keyword pikeType inline nomask private protected public static
+let s:cpo_save = &cpo
+set cpo&vim
+" For multiline strings, try formatting them as SQL
+syn include @pikeSQL <sfile>:p:h/sqloracle.vim
+unlet b:current_syntax
-syn keyword pikeTodo contained TODO FIXME XXX
+" For embedded Autodoc documentation (WIP)
+syn include @pikeAutodoc <sfile>:p:h/autodoc.vim
+unlet b:current_syntax
+
+syn case match
+
+" Supports array, multiset, mapping multi-character delimiter matching
+" Supports rotating amongst several same-level preprocessor conditionals
+packadd! matchit
+let b:match_words = "({:}\\@1<=),(\\[:]\\@1<=),(<:>\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>"
+
+" A bunch of useful Pike keywords
+syn keyword pikeDebug gauge backtrace describe_backtrace werror _Static_assert static_assert
+syn keyword pikeException error catch throw
+syn keyword pikeLabel case default break return continue
+syn keyword pikeConditional if else switch
+syn keyword pikeRepeat while for foreach do
+
+syn keyword pikePredef RegGetKeyNames RegGetValue RegGetValues
+syn keyword pikePredef __automap__ __empty_program
+syn keyword pikePredef __handle_sprintf_format __parse_pike_type _disable_threads
+syn keyword pikePredef _do_call_outs _exit _gdb_breakpoint
+syn keyword pikePredef abs access acos acosh add_constant alarm all_constants
+syn keyword pikePredef array_sscanf asin asinh atan atan2 atanh atexit
+syn keyword pikePredef basetype call_function call_out call_out_info cd ceil
+syn keyword pikePredef combine_path combine_path_nt
+syn keyword pikePredef combine_path_unix compile copy_value cos cosh cpp crypt
+syn keyword pikePredef ctime decode_value delay encode_value encode_value_canonic
+syn keyword pikePredef enumerate errno exece exit exp file_stat file_truncate
+syn keyword pikePredef filesystem_stat find_call_out floor fork function_name
+syn keyword pikePredef function_object function_program gc
+syn keyword pikePredef get_active_compilation_handler get_active_error_handler
+syn keyword pikePredef get_all_groups get_all_users get_dir get_groups_for_user
+syn keyword pikePredef get_iterator get_profiling_info get_weak_flag getcwd
+syn keyword pikePredef getgrgid getgrnam gethrdtime gethrtime gethrvtime getpid
+syn keyword pikePredef getpwnam getpwuid getxattr glob gmtime has_index has_prefix
+syn keyword pikePredef has_suffix has_value hash hash_7_0 hash_7_4 hash_8_0
+syn keyword pikePredef hash_value kill limit listxattr load_module localtime
+syn keyword pikePredef log lower_case master max min mkdir mktime mv
+syn keyword pikePredef object_program pow query_num_arg random_seed
+syn keyword pikePredef remove_call_out removexattr replace_master rm round
+syn keyword pikePredef set_priority set_weak_flag setxattr sgn signal signame
+syn keyword pikePredef signum sin sinh sleep sort sprintf sqrt sscanf strerror
+syn keyword pikePredef string_filter_non_unicode string_to_unicode string_to_utf8
+syn keyword pikePredef tan tanh time trace types ualarm unicode_to_string
+syn keyword pikePredef upper_case utf8_to_string version
+
+syn keyword pikePredef write lock try_lock
+syn keyword pikePredef MutexKey Timestamp Date Time TimeTZ Interval Inet Range
+syn keyword pikePredef Null null inf nan
+
+syn keyword pikeTodo contained TODO FIXME XXX
+
+" Match parengroups: allows for highlighting indices of mappings and
+" highlighting semicolons that are out of place due to a paren imbalance
+syn cluster pikePreShort contains=pikeDefine,pikePreProc,pikeCppOutWrapper,pikeCppInWrapper,pikePreCondit,pikePreConditMatch
+syn cluster pikeExprGroup contains=pikeMappIndex,@pikeStmt,pikeNest,@pikeBadGroup,pikeSoftCast
+syn match pikeWord transparent contained /[^()'"[\]{},;:]\+/ contains=ALLBUT,@pikePreProcGroup,@pikeExprGroup
+syn match pikeFirstWord transparent display contained /^\s*#[^()'"[\]{},;:]\+/ contains=@pikePreShort
+syn cluster pikeMappElm contains=pikeMappIndex,@pikeStmt
+syn cluster pikeStmt contains=pikeFirstWord,pikeCharacter,pikeString,pikeMlString,pikeWord,pikeNest
+syn cluster pikeBadGroup contains=pikeBadPClose,pikeBadAClose,pikeBadBClose,pikeBadSPClose,pikeBadSAClose,pikeBadSBClose,pikeBadSClose,pikeBadSPAClose,pikeBadSBAClose
+syn match pikeBadPClose display contained "[}\]]"
+syn match pikeBadAClose display contained "[)\]]"
+syn match pikeBadBClose display contained "[)}]"
+syn match pikeBadSPClose display contained "[;}\]]"
+syn match pikeBadSAClose display contained "[;)\]]"
+syn match pikeBadSPAClose display contained "[;\]]"
+syn match pikeBadSBAClose display contained "[;}]"
+syn match pikeBadSClose display contained "[;)}\]]"
+syn region pikeNest transparent start="(\@1<!{" end="}" contains=@pikeStmt,pikeUserLabel,pikeBadAClose
+syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<!([[{<]\@!" end=")" contains=@pikeStmt,pikeBadSPClose
+syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<=(" end=")" contains=@pikeStmt,pikeBadPClose
+syn region pikeNest transparent start="(\@1<!\[" end="]" contains=@pikeStmt,pikeBadSBClose
+syn region pikeNest transparent start="(\zs\[" end="])" contains=@pikeMappElm,pikeBadSBAClose
+" For some reason specifying a matchgroup on the pikeNest below makes it
+" override the shorter variant; consider it a kludge, no idea why it works
+syn region pikeNest transparent matchgroup=pikeSoftCast start=%(\zs\[[ \t\v\r\n.a-zA-Z0-9_():,|]\+])\@!% end=")" contains=@pikeStmt
+syn region pikeNest transparent start="(\zs{" end="})" contains=@pikeStmt,pikeBadSPAClose
+syn region pikeNest transparent start="(\zs<" end=">)" contains=@pikeStmt,pikeBadSPClose keepend
+
+" It's easy to accidentally add a space after a backslash that was intended
+" for line continuation. Some compilers allow it, which makes it
+" unpredictable and should be avoided.
+syn match pikeBadContinuation contained "\\\s\+$"
+
+" pikeCommentGroup allows adding matches for special things in comments
+syn cluster pikeCommentGroup contains=pikeTodo,pikeBadContinuation
" String and Character constants
" Highlight special characters (those which have a backslash) differently
-syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\."
-syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial
-syn match pikeCharacter "'[^\\]'"
-syn match pikeSpecialCharacter "'\\.'"
-syn match pikeSpecialCharacter "'\\[0-7][0-7]'"
-syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'"
-
-" Compound data types
-syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})'
-syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])'
-syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)'
-
-"catch errors caused by wrong parenthesis
-syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField
-syn match pikeParenError ")"
-syn match pikeInParen contained "[^(][{}][^)]"
+syn match pikeSpecial display contained "\\\%(x\x*\|d\d*\|\o\+\|u\x\{4}\|U\x\{8}\|[abefnrtv]\|$\)"
+
+" ISO C11 or ISO C++ 11
+if !exists("c_no_cformat")
+ " Highlight % items in strings.
+ syn match pikeFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjzt]\|ll\|hh\)\=\%([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
+ syn match pikeFormat display "%%" contained
+ syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,pikeFormat,@Spell keepend
+ syn region pikeMlString start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeFormat,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend
+else
+ syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,@Spell
+ syn region pikeMlString transparent start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend
+endif
+
+" Use SQL-syntax highlighting in multiline string if it starts with
+" a standard SQL keyword
+syn case ignore
+" FIXME Use explicit newline match to cover up a bug in the regexp engine
+" If the kludge is not used, the match will only start unless at least a space
+" follows the initial doublequote on the first line (or the keyword is on
+" the first line).
+syn region pikeEmbeddedString contained start=+\%(#"\n\?\)\@2<=\_s*\%(SELECT\|INSERT\|UPDATE\|DELETE\|WITH\|CREATE\|DROP\|ALTER\)\>+ skip=+\\\\\|\\"+ end=+[\\#]\@1<!"+ contains=@pikeSQL,pikeBindings keepend
+syn case match
+
+syn match pikeBindings display contained ":\@1<!:\I\i*"
+
+syn match pikeCharacter "'[^\\']'" contains=pikeDelimiterSQ
+syn match pikeCharacter "'[^']*'" contains=pikeSpecial,pikeDelimiterSQ
+syn match pikeSpecialError "'\\[^'\"?\\abefnrtv]'"
+syn match pikeDelimiterDQ display +"+ contained
+syn match pikeDelimiterSQ display +'+ contained
+
+"when wanted, highlight trailing white space
+if exists("c_space_errors")
+ if !exists("c_no_trail_space_error")
+ syn match pikeSpaceError display excludenl "\s\+$"
+ endif
+ if !exists("c_no_tab_space_error")
+ syn match pikeSpaceError display " \+\ze\t"
+ endif
+endif
"integer number, or floating point number without a dot and with "f".
syn case ignore
-syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
+syn match pikeNumbers display transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctalError,pikeOctal
+" Same, but without octal error (for comments)
+syn match pikeNumbersCom display contained transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctal
+syn match pikeNumber display contained "\<\d\+\%(u\=l\{0,2}\|ll\=u\)\>"
+"hex number
+syn match pikeNumber display contained "\<0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>"
+" Flag the first zero of an octal number as something special
+syn match pikeOctal display contained "\<0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=pikeOctalZero
+syn match pikeOctalZero display contained "\<0"
"floating point number, with dot, optional exponent
-syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
+syn match pikeFloat display contained "\<\d\+\%(f\|\.[0-9.]\@!\d*\%(e[-+]\=\d\+\)\=[fl]\=\)"
"floating point number, starting with a dot, optional exponent
-syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
+syn match pikeFloat display contained "[0-9.]\@1<!\.\d\+\%(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent
-syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
-"hex number
-syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
-"syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>"
-syn case match
+syn match pikeFloat display contained "\<\d\+e[-+]\=\d\+[fl]\=\>"
+
+"hexadecimal floating point number, two variants, with exponent
+syn match pikeFloat display contained "\<0x\%(\x\+\.\?\|\x*\.\x\+\)p[-+]\=\d\+[fl]\=\>"
+
" flag an octal number with wrong digits
-syn match pikeOctalError "\<0[0-7]*[89]"
+syn match pikeOctalError display contained "\<0\o*[89]\d*"
+syn case match
if exists("c_comment_strings")
" A comment can contain pikeString, pikeCharacter and pikeNumber.
@@ -61,82 +186,201 @@ if exists("c_comment_strings")
" need to use a special type of pikeString: pikeCommentString, which also ends on
" "*/", and sees a "*" at the start of the line as comment again.
" Unfortunately this doesn't very well work for // type of comments :-(
- syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)"
- syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip
- syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial
- syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat
- syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber
- syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber
+ syn match pikeCommentSkip contained "^\s*\*\%($\|\s\+\)"
+ syn region pikeCommentString contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\ze\*/+ contains=pikeSpecial,pikeCommentSkip
+ syn region pikeComment2String contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial
+ syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeComment2String,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord
+ if exists("c_no_comment_fold")
+ " Use "extend" here to have preprocessor lines not terminate halfway a
+ " comment.
+ syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord
+ else
+ syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord
+ endif
else
- syn region pikeComment start="/\*" end="\*/" contains=pikeTodo
- syn match pikeComment "//.*" contains=pikeTodo
- syn match pikeComment "#!.*" contains=pikeTodo
+ syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord
+ if exists("c_no_comment_fold")
+ syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord
+ else
+ syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord
+ endif
endif
-syntax match pikeCommentError "\*/"
+" keep a // comment separately, it terminates a preproc. conditional
+syn match pikeCommentError display "\*/"
+syn match pikeCommentStartError display "/\ze\*" contained
+
+syn keyword pikeOperator sizeof
+syn keyword pikeOperator typeof _typeof _refs
+syn keyword pikeOperator zero_type intp stringp arrayp mappingp multisetp
+syn keyword pikeOperator objectp functionp programp callablep destructedp
+syn keyword pikeOperator object_variablep undefinedp
+syn keyword pikeOperator allocate equal
+syn keyword pikeOperator aggregate aggregate_mapping aggregate_multiset
+syn keyword pikeOperator map filter search replace reverse column rows
+syn keyword pikeOperator indices values mkmapping mkmultiset m_delete sort
+syn keyword pikeOperator m_delete destruct
+syn keyword pikeOperator create _destruct _sprintf cast _encode _decode
+syn keyword pikeOperator __hash _sizeof _values _indices __INIT _equal
+syn keyword pikeOperator _is_type _m_delete _get_iterator _search
+syn keyword pikeOperator _serialize _deserialize _sqrt _types _random
+syn keyword pikeOperator _size_object
+
+syn keyword pikeType int void
+syn keyword pikeType float
+syn keyword pikeType bool string array mapping multiset mixed
+syn keyword pikeType object function program auto
+
+syn keyword pikeType this this_object this_program
+syn keyword pikeType sprintf_args sprintf_format sprintf_result
+syn keyword pikeType strict_sprintf_format
+
+syn keyword pikeStructure class enum typedef inherit import
+syn keyword pikeTypedef typedef
+syn keyword pikeStorageClass private protected public constant final variant
+syn keyword pikeStorageClass optional inline extern static __deprecated__ lambda
-syn keyword pikeOperator sizeof
-syn keyword pikeType int string void float mapping array multiset mixed
-syn keyword pikeType program object function
+syn keyword pikeConstant __LINE__ __FILE__ __DIR__ __DATE__ __TIME__
+syn keyword pikeConstant __AUTO_BIGNUM__ __NT__
+syn keyword pikeConstant __BUILD__ __COUNTER__ _MAJOR__ __MINOR__ __VERSION__
+syn keyword pikeConstant __REAL_BUILD__ _REAL_MAJOR__ __REAL_MINOR__
+syn keyword pikeConstant __REAL_VERSION__ __PIKE__ UNDEFINED
-syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError
-syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
-syn match pikeIncluded contained "<[^>]*>"
-syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded
-"syn match pikeLineSkip "\\$"
-syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen
-syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen
+" These should actually only be parsed in preprocessor conditionals
+syn keyword pikeCppOperator contained defined constant efun _Pragma
+
+syn keyword pikeBoolean true false
+
+syn match pikeCppPrefix display "^\s*\zs#\s*[a-z]\+" contained
+syn region pikePreCondit start="^\s*#\s*\%(if\%(n\?def\)\?\|el\%(se\)\?if\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix
+syn match pikePreConditMatch display "^\s*\zs#\s*\%(else\|endif\)\>"
+if !exists("c_no_if0")
+ syn cluster pikeCppOutInGroup contains=pikeCppInIf,pikeCppInElse,pikeCppInElse2,pikeCppOutIf,pikeCppOutIf2,pikeCppOutElse,pikeCppInSkip,pikeCppOutSkip
+ syn region pikeCppOutWrapper start="^\s*\zs#\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=pikeCppOutIf,pikeCppOutElse,@NoSpell fold
+ syn region pikeCppOutIf contained start="0\+" matchgroup=pikeCppOutWrapper end="^\s*#\s*endif\>" contains=pikeCppOutIf2,pikeCppOutElse
+ if !exists("c_no_if0_fold")
+ syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell fold
+ else
+ syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell
+ endif
+ syn region pikeCppOutElse contained matchgroup=pikeCppOutWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit
+ syn region pikeCppInWrapper start="^\s*\zs#\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=pikeCppInIf,pikeCppInElse fold
+ syn region pikeCppInIf contained matchgroup=pikeCppInWrapper start="\d\+" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit
+ if !exists("c_no_if0_fold")
+ syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2 fold
+ else
+ syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2
+ endif
+ syn region pikeCppInElse2 contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)\%([^/]\|/[^/*]\)*" end="^\ze\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip,@Spell
+ syn region pikeCppOutSkip contained start="^\s*#\s*if\%(n\?def\)\?\>" skip="\\$" end="^\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip
+ syn region pikeCppInSkip contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifn\?def\>\)" skip="\\$" end="^\s*#\s*endif\>" containedin=pikeCppOutElse,pikeCppInIf,pikeCppInSkip contains=TOP,pikePreProc
+endif
+syn region pikeIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeDelimiterDQ keepend
+syn match pikeIncluded display contained "<[^>]*>"
+syn match pikeInclude display "^\s*\zs#\s*include\>\s*["<]" contains=pikeIncluded
+syn cluster pikePreProcGroup contains=pikeIncluded,pikeInclude,pikeEmbeddedString,pikeCppOutWrapper,pikeCppInWrapper,@pikeCppOutInGroup,pikeFormat,pikeMlString,pikeCommentStartError,@pikeBadGroup,pikeWord
+syn region pikeDefine start="^\s*\zs#\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=@pikeStmt,@pikeBadGroup
+syn region pikePreProc start="^\s*\zs#\s*\%(pragma\|charset\|pike\|require\|string\|line\|warning\|error\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix,@Spell,pikeConstant
+
+syn match pikeAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@pikeAutodoc containedin=pikeComment,pikeCommentL
+syn cluster pikeCommentGroup add=pikeAutodocReal
+syn cluster pikePreProcGroup add=pikeAutodocReal
" Highlight User Labels
-syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
-syn match pikeUserLabel "^\s*\I\i*\s*:$"
-syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1
-syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1
-syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1
+syn match pikeUserLabel display "\%(^\|[{};]\)\zs\I\i*\s*\ze:\%([^:]\|$\)" contained contains=NONE
+syn match pikeUserLabel display "\%(\<\%(break\|continue\)\_s\+\)\@10<=\I\i*" contained contains=NONE
+syn match pikeUserLabel display "\%(\<case\)\@5<=\s\+[^<()[\]{},;:]\+\ze::\@!" contained contains=pikeDelimiterDQ,pikeDelimiterSQ
-" Avoid recognizing most bitfields as labels
-syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1
-syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1
+syn match pikeMappIndex display contained "[^<()[\]{},;:]\+\ze::\@!" contains=pikeDelimiterDQ,pikeDelimiterSQ
+syn match pikeSoftCast display contained "\[[ \t\v\r\n.a-zA-Z0-9_():,|\+]" contains=NONE
-syn sync ccomment pikeComment minlines=10
+if exists("c_minlines")
+ let b:c_minlines = c_minlines
+else
+ if !exists("c_no_if0")
+ let b:c_minlines = 400 " #if 0 constructs can be long
+ else
+ let b:c_minlines = 200 " mostly for multiline strings
+ endif
+endif
+exec "syn sync ccomment pikeComment minlines=" . b:c_minlines
+syn sync match pikeMlStringSync grouphere pikeMlString +^[^"#]\+#\"+
+syn sync match pikeAutodocSync grouphere pikeCommentL "^\s*//!"
" Define the default highlighting.
-" Only when an item doesn't have highlighting yet
-
+" Only used when an item doesn't have highlighting yet
+hi def link pikeFormat SpecialChar
+hi def link pikeMlString String
+hi def link pikeCommentL Comment
+hi def link pikeCommentStart Comment
hi def link pikeLabel Label
-hi def link pikeUserLabel Label
+hi def link pikeUserLabel Identifier
hi def link pikeConditional Conditional
hi def link pikeRepeat Repeat
-hi def link pikeCharacter Character
-hi def link pikeSpecialCharacter pikeSpecial
+hi def link pikeCharacter Character
+hi def link pikeDelimiterDQ Delimiter
+hi def link pikeDelimiterSQ Delimiter
hi def link pikeNumber Number
+hi def link pikeOctal Number
+hi def link pikeOctalZero PreProc " link this to Error if you want
hi def link pikeFloat Float
-hi def link pikeOctalError pikeError
-hi def link pikeParenError pikeError
-hi def link pikeInParen pikeError
-hi def link pikeCommentError pikeError
-hi def link pikeOperator Operator
+hi def link pikeOctalError Error
+hi def link pikeCommentError Error
+hi def link pikeCommentStartError Error
+hi def link pikeSpaceError Error
+hi def link pikeSpecialError Error
+hi def link pikeOperator Operator
+hi def link pikeCppOperator Operator
+hi def link pikeStructure Structure
+hi def link pikeTypedef Typedef
+hi def link pikeStorageClass StorageClass
hi def link pikeInclude Include
+hi def link pikeCppPrefix PreCondit
hi def link pikePreProc PreProc
hi def link pikeDefine Macro
-hi def link pikeIncluded pikeString
+hi def link pikeIncluded String
hi def link pikeError Error
-hi def link pikeStatement Statement
-hi def link pikePreCondit PreCondit
+hi def link pikeDebug Debug
+hi def link pikeException Exception
+hi def link pikeStatement Statement
hi def link pikeType Type
-hi def link pikeCommentError pikeError
-hi def link pikeCommentString pikeString
-hi def link pikeComment2String pikeString
-hi def link pikeCommentSkip pikeComment
+hi def link pikeConstant Constant
+hi def link pikeBoolean Boolean
+hi def link pikeCommentString String
+hi def link pikeComment2String String
+hi def link pikeCommentSkip Comment
hi def link pikeString String
hi def link pikeComment Comment
hi def link pikeSpecial SpecialChar
hi def link pikeTodo Todo
-hi def link pikeException pikeStatement
-hi def link pikeCompoundType Constant
-"hi def link pikeIdentifier Identifier
+hi def link pikeBadContinuation Error
+
+hi def link pikeCppInWrapper PreCondit
+hi def link pikeCppOutWrapper PreCondit
+hi def link pikePreConditMatch PreCondit
+
+hi def link pikeCppOutSkip Comment
+hi def link pikeCppInElse2 Comment
+hi def link pikeCppOutIf2 Comment
+hi def link pikeCppOut Comment
+hi def link pikePredef Statement
+hi def link pikeBindings Identifier
+hi def link pikeMappIndex Identifier
+hi def link pikeSoftCast Type
+hi def link pikeBadGroup Error
+hi def link pikeBadPClose Error
+hi def link pikeBadAClose Error
+hi def link pikeBadBClose Error
+hi def link pikeBadSPClose Error
+hi def link pikeBadSAClose Error
+hi def link pikeBadSBClose Error
+hi def link pikeBadSPAClose Error
+hi def link pikeBadSBAClose Error
+hi def link pikeBadSClose Error
let b:current_syntax = "pike"
+let &cpo = s:cpo_save
+unlet s:cpo_save
" vim: ts=8
diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim
index b50b9c60e..78472cdbf 100644
--- a/runtime/syntax/readline.vim
+++ b/runtime/syntax/readline.vim
@@ -1,7 +1,8 @@
" Vim syntax file
" Language: readline(3) configuration file
+" Maintainer: Daniel Moch <daniel@danielmoch.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2017-06-25
+" Latest Revision: 2017-12-25
" readline_has_bash - if defined add support for bash specific
" settings/functions
@@ -152,6 +153,9 @@ syn keyword readlineVariable contained
\ skipwhite
\ comment-begin
\ isearch-terminators
+ \ vi-cmd-mode-string
+ \ vi-ins-mode-string
+ \ emacs-mode-string
syn keyword readlineVariable contained
\ nextgroup=readlineNumber
diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim
index a14f15eef..11ce2e005 100644
--- a/runtime/syntax/snobol4.vim
+++ b/runtime/syntax/snobol4.vim
@@ -2,15 +2,16 @@
" Language: SNOBOL4
" Maintainer: Rafal Sulejman <rms@poczta.onet.pl>
" Site: http://rms.republika.pl/vim/syntax/snobol4.vim
-" Last change: 2006 may 10
+" Last change: : Thu, 25 Jan 2018 14:21:24 +0100
" Changes:
+" - system variables updated for SNOBOL4 2.0+
" - strict snobol4 mode (set snobol4_strict_mode to activate)
" - incorrect HL of dots in strings corrected
" - incorrect HL of dot-variables in parens corrected
" - one character labels weren't displayed correctly.
" - nonexistent Snobol4 keywords displayed as errors.
-" quit when a syntax file was already loaded
+" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@@ -59,7 +60,7 @@ syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1
syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError
syn match snobol4Number "\<\d*\(\.\d\d*\)*\>"
syn match snobol4BogusSysVar "&\w\{1,}"
-syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)"
+syn match snobol4SysVar "&\<\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|digits\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)\>"
syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)"
syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*"
syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)"
@@ -100,11 +101,11 @@ hi def link snobol4ErrInBracket snobol4Error
hi def link snobol4SysVar Keyword
hi def link snobol4BogusSysVar snobol4Error
if exists("snobol4_strict_mode")
-hi def link snobol4ExtSysVar WarningMsg
-hi def link snobol4ExtKeyword WarningMsg
+ hi def link snobol4ExtSysVar WarningMsg
+ hi def link snobol4ExtKeyword WarningMsg
else
-hi def link snobol4ExtSysVar snobol4SysVar
-hi def link snobol4ExtKeyword snobol4Keyword
+ hi def link snobol4ExtSysVar snobol4SysVar
+ hi def link snobol4ExtKeyword snobol4Keyword
endif