aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/ada.vim10
-rw-r--r--runtime/compiler/csslint.vim16
-rw-r--r--runtime/compiler/ghc.vim26
-rw-r--r--runtime/compiler/pylint.vim16
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/change.txt12
-rw-r--r--runtime/doc/cmdline.txt6
-rw-r--r--runtime/doc/diff.txt5
-rw-r--r--runtime/doc/eval.txt42
-rw-r--r--runtime/doc/helphelp.txt15
-rw-r--r--runtime/doc/intro.txt11
-rw-r--r--runtime/doc/message.txt5
-rw-r--r--runtime/doc/options.txt7
-rw-r--r--runtime/doc/pi_gzip.txt1
-rw-r--r--runtime/doc/quickref.txt2
-rw-r--r--runtime/doc/scroll.txt3
-rw-r--r--runtime/doc/starting.txt3
-rw-r--r--runtime/doc/syntax.txt23
-rw-r--r--runtime/doc/tabpage.txt46
-rw-r--r--runtime/doc/term.txt10
-rw-r--r--runtime/doc/usr_03.txt2
-rw-r--r--runtime/doc/usr_22.txt2
-rw-r--r--runtime/doc/usr_41.txt1
-rw-r--r--runtime/doc/vim_diff.txt2
-rw-r--r--runtime/filetype.vim17
-rw-r--r--runtime/ftplugin/awk.vim18
-rw-r--r--runtime/indent/fortran.vim12
-rw-r--r--runtime/indent/html.vim25
-rw-r--r--runtime/indent/javascript.vim388
-rw-r--r--runtime/keymap/armenian-eastern_utf-8.vim4
-rw-r--r--runtime/keymap/armenian-western_utf-8.vim4
-rw-r--r--runtime/menu.vim4
-rw-r--r--runtime/optwin.vim2
-rw-r--r--runtime/plugin/gzip.vim6
-rw-r--r--runtime/syntax/autohotkey.vim188
-rw-r--r--runtime/syntax/c.vim4
-rw-r--r--runtime/syntax/css.vim5
-rw-r--r--runtime/syntax/debchangelog.vim4
-rw-r--r--runtime/syntax/debcontrol.vim2
-rw-r--r--runtime/syntax/debsources.vim4
-rw-r--r--runtime/syntax/fortran.vim10
-rw-r--r--runtime/syntax/html.vim32
-rw-r--r--runtime/syntax/matlab.vim10
-rw-r--r--runtime/syntax/nasm.vim25
-rw-r--r--runtime/syntax/php.vim40
-rw-r--r--runtime/syntax/sh.vim20
-rw-r--r--runtime/syntax/sshconfig.vim5
-rw-r--r--runtime/syntax/sshdconfig.vim5
-rw-r--r--runtime/syntax/tex.vim38
-rw-r--r--runtime/syntax/vim.vim3
-rw-r--r--runtime/syntax/xpm.vim7
-rw-r--r--runtime/syntax/xpm2.vim7
-rw-r--r--src/nvim/fileio.c2
53 files changed, 795 insertions, 364 deletions
diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim
index cc5191fa43..ce3a19369a 100644
--- a/runtime/autoload/ada.vim
+++ b/runtime/autoload/ada.vim
@@ -2,12 +2,13 @@
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
-" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
+" Maintainer: Mathias Brousset <mathiasb17@gmail.com>
+" Martin Krischik <krischik@users.sourceforge.net>
" Taylor Venable <taylor@metasyntax.net>
" Neil Bird <neil@fnxweb.com>
" Ned Okie <nokie@radford.edu>
" $Author: krischik $
-" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
+" $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
@@ -23,6 +24,7 @@
" 09.05.2007 MK Session just won't work no matter how much
" tweaking is done
" 19.09.2007 NO still some mapleader problems
+" 31.01.2017 MB fix more mapleader problems
" Help Page: ft-ada-functions
"------------------------------------------------------------------------------
@@ -585,11 +587,11 @@ function ada#Map_Menu (Text, Keys, Command)
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer>" .
- \ escape(l:leader . "a" . a:Keys , '\') .
+ \ " <Leader>a" . a:Keys .
\" :" . a:Command
execute
\ "inoremap <buffer>" .
- \ escape(l:leader . "a" . a:Keys , '\') .
+ \ " <Learder>a" . a:Keys .
\" <C-O>:" . a:Command
endif
return
diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim
new file mode 100644
index 0000000000..14c4289a24
--- /dev/null
+++ b/runtime/compiler/csslint.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: csslint for CSS
+" Maintainer: Daniel Moch <daniel@danielmoch.com>
+" Last Change: 2016 May 21
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "csslint"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=csslint\ --format=compact
+CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m
diff --git a/runtime/compiler/ghc.vim b/runtime/compiler/ghc.vim
new file mode 100644
index 0000000000..c98ae302a8
--- /dev/null
+++ b/runtime/compiler/ghc.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler: GHC Haskell Compiler
+" Maintainer: Daniel Campoverde <alx@sillybytes.net>
+" Latest Revision: 2016-11-29
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "ghc"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet errorformat=
+ \%-G%.%#:\ build,
+ \%-G%.%#preprocessing\ library\ %.%#,
+ \%-G[%.%#]%.%#,
+ \%E%f:%l:%c:\ %m,
+ \%-G--%.%#
+
+if exists('g:compiler_ghc_ignore_unmatched_lines')
+ CompilerSet errorformat+=%-G%.%#
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim
new file mode 100644
index 0000000000..93079ce61d
--- /dev/null
+++ b/runtime/compiler/pylint.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: Pylint for Python
+" Maintainer: Daniel Moch <daniel@danielmoch.com>
+" Last Change: 2016 May 20
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "pylint"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no
+CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%#
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index f783438fc9..50af870975 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -30,7 +30,7 @@ files matching *.c. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your vimrc file.
- *E203* *E204* *E143* *E855*
+ *E203* *E204* *E143* *E855* *E937*
WARNING: Using autocommands is very powerful, and may lead to unexpected side
effects. Be careful not to destroy your text.
- It's a good idea to do some testing on an expendable copy of a file first.
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index c669d1792d..98cf459714 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -614,12 +614,14 @@ Directory for temporary files is created in the first suitable directory of:
For the {pattern} see |pattern|.
{string} can be a literal string, or something
special; see |sub-replace-special|.
+ *E939*
When [range] and [count] are omitted, replace in the
- current line only.
- When [count] is given, replace in [count] lines,
- starting with the last line in [range]. When [range]
- is omitted start in the current line.
- Also see |cmdline-ranges|.
+ current line only. When [count] is given, replace in
+ [count] lines, starting with the last line in [range].
+ When [range] is omitted start in the current line.
+ [count] must be a positive number. Also see
+ |cmdline-ranges|.
+
See |:s_flags| for [flags].
:[range]s[ubstitute] [flags] [count]
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 3e041c3b62..80b6cbbeab 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1000,10 +1000,10 @@ There are several ways to leave the command-line window:
Insert and in Normal mode.
CTRL-C Continue in Command-line mode. The command-line under the
cursor is used as the command-line. Works both in Insert and
- in Normal mode. ":close" also works. There is no redraw,
- thus the window will remain visible.
+ in Normal mode. There is no redraw, thus the window will
+ remain visible.
:quit Discard the command line and go back to Normal mode.
- ":exit", ":xit" and CTRL-\ CTRL-N also work.
+ ":close", ":exit", ":xit" and CTRL-\ CTRL-N also work.
:qall Quit Vim, unless there are changes in some buffer.
:qall! Quit Vim, discarding changes to any buffer.
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 12f4563518..e04aa55b5a 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -123,6 +123,8 @@ file for a moment and come back to the same file and be in diff mode again.
related options only happens in a window that has 'diff' set,
if the current window does not have 'diff' set then no options
in it are changed.
+ Hidden buffers are also removed from the list of diff'ed
+ buffers.
The `:diffoff` command resets the relevant options to the values they had when
using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode.
@@ -156,7 +158,8 @@ The alignment of text will go wrong when:
All the buffers edited in a window where the 'diff' option is set will join in
the diff. This is also possible for hidden buffers. They must have been
-edited in a window first for this to be possible.
+edited in a window first for this to be possible. To get rid of the hidden
+buffers use `:diffoff!`.
*:DiffOrig* *diff-original-file*
Since 'diff' is a window-local option, it's possible to view the same buffer
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 30fd75c447..deae268f56 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1305,7 +1305,8 @@ b:changedtick The total number of changes to the current buffer. It is
: let my_changedtick = b:changedtick
: call My_Update()
:endif
-<
+< You cannot change or delete the b:changedtick variable.
+
*window-variable* *w:var* *w:*
A variable name that is preceded with "w:" is local to the current window. It
is deleted when the window is closed.
@@ -2177,8 +2178,8 @@ matchstr({expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
matchstrpos({expr}, {pat}[, {start}[, {count}]])
List {count}'th match of {pat} in {expr}
-max({list}) Number maximum value of items in {list}
-min({list}) Number minimum value of items in {list}
+max({expr}) Number maximum value of items in {expr}
+min({expr}) Number minimum value of items in {expr}
mkdir({name} [, {path} [, {prot}]])
Number create directory {name}
mode([expr]) String current editing mode
@@ -5481,16 +5482,20 @@ matchstrpos({expr}, {pat}[, {start}[, {count}]]) *matchstrpos()*
The type isn't changed, it's not necessarily a String.
*max()*
-max({list}) Return the maximum value of all items in {list}.
- If {list} is not a list or one of the items in {list} cannot
- be used as a Number this results in an error.
- An empty |List| results in zero.
+max({expr}) Return the maximum value of all items in {expr}.
+ {expr} can be a list or a dictionary. For a dictionary,
+ it returns the maximum of all values in the dictionary.
+ If {expr} is neither a list nor a dictionary, or one of the
+ items in {expr} cannot be used as a Number this results in
+ an error. An empty |List| or |Dictionary| results in zero.
*min()*
-min({list}) Return the minimum value of all items in {list}.
- If {list} is not a list or one of the items in {list} cannot
- be used as a Number this results in an error.
- An empty |List| results in zero.
+min({expr}) Return the minimum value of all items in {expr}.
+ {expr} can be a list or a dictionary. For a dictionary,
+ it returns the minimum of all values in the dictionary.
+ If {expr} is neither a list nor a dictionary, or one of the
+ items in {expr} cannot be used as a Number this results in
+ an error. An empty |List| or |Dictionary| results in zero.
*mkdir()* *E739*
mkdir({name} [, {path} [, {prot}]])
@@ -5726,7 +5731,7 @@ printf({fmt}, {expr1} ...) *printf()*
%e floating point number as 1.23e3, inf, -inf or nan
%E floating point number as 1.23E3, INF, -INF or NAN
%g floating point number, as %f or %e depending on value
- %G floating point number, as %f or %E depending on value
+ %G floating point number, as %F or %E depending on value
%% the % character itself
%p representation of the pointer to the container
@@ -7061,7 +7066,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()*
Like |strpart()| but using character index and length instead
of byte index and length.
When a character index is used where a character does not
- exist it is assumed to be one byte. For example: >
+ exist it is assumed to be one character. For example: >
strcharpart('abc', -1, 2)
< results in 'a'.
@@ -7421,7 +7426,8 @@ systemlist({cmd} [, {input} [, {keepempty}]]) *systemlist()*
output separated by NL) with NULs transformed into NLs. Output
is the same as |readfile()| will output with {binary} argument
set to "b", except that a final newline is not preserved,
- unless {keepempty} is present and it's non-zero.
+ unless {keepempty} is non-zero.
+ Note that on MS-Windows you may get trailing CR characters.
Returns an empty string on error, so be careful not to run
into |E706|.
@@ -7896,7 +7902,7 @@ winnr([{arg}]) The result is a Number, which is the number of the current
is returned.
The number can be used with |CTRL-W_w| and ":wincmd w"
|:wincmd|.
- Also see |tabpagewinnr()|.
+ Also see |tabpagewinnr()| and |win_getid()|.
*winrestcmd()*
winrestcmd() Returns a sequence of |:resize| commands that should restore
@@ -8161,6 +8167,7 @@ timers Compiled with |timer_start()| support.
title Compiled with window title support |'title'|.
toolbar Compiled with support for |gui-toolbar|.
unix Unix version of Vim.
+unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
user_commands User-defined commands.
vertsplit Compiled with vertically split windows |:vsplit|.
vim_starting True while initial source'ing takes place. |startup|
@@ -8655,6 +8662,11 @@ This does NOT work: >
value and the global value are changed.
Example: >
:let &path = &path . ',/usr/local/include'
+< This also works for terminal codes in the form t_xx.
+ But only for alphanumerical names. Example: >
+ :let &t_k1 = "\<Esc>[234;"
+< When the code does not exist yet it will be created as
+ a terminal key code, there is no error.
:let &{option-name} .= {expr1}
For a string option: Append {expr1} to the value.
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 6741efabd8..31a425bdee 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -27,10 +27,16 @@ Help on help files *helphelp*
*{subject}* *E149* *E661*
:h[elp] {subject} Like ":help", additionally jump to the tag {subject}.
- {subject} can include wildcards like "*", "?" and
+ For example: >
+ :help options
+
+< {subject} can include wildcards such as "*", "?" and
"[a-z]":
:help z? jump to help for any "z" command
:help z. jump to the help for "z."
+ But when a tag exists it is taken literally:
+ :help :? jump to help for ":?"
+
If there is no full match for the pattern, or there
are several matches, the "best" match will be used.
A sophisticated algorithm is used to decide which
@@ -67,18 +73,19 @@ Help on help files *helphelp*
example to find help for CTRL-V in Insert mode: >
:help i^V
<
- To use a regexp |pattern|, first do ":help" and then
+ It is also possible to first do ":help" and then
use ":tag {pattern}" in the help window. The
":tnext" command can then be used to jump to other
matches, "tselect" to list matches and choose one. >
- :help index| :tse z.
+ :help index
+ :tselect /.*mode
< When there is no argument you will see matches for
"help", to avoid listing all possible matches (that
would be very slow).
The number of matches displayed is limited to 300.
- This command can be followed by '|' and another
+ The `:help` command can be followed by '|' and another
command, but you don't need to escape the '|' inside a
help command. So these both work: >
:help |
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 7564679b93..bbe2df11e6 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -87,21 +87,18 @@ mention that.
*mail-list* *maillist*
There are several mailing lists for Vim:
-<vim@vim.org>
+<vim@vim.org> *vim-use* *vim_use*
For discussions about using existing versions of Vim: Useful mappings,
questions, answers, where to get a specific version, etc. There are
quite a few people watching this list and answering questions, also
for beginners. Don't hesitate to ask your question here.
-<vim-dev@vim.org> *vim-dev* *vimdev*
+<vim-dev@vim.org> *vim-dev* *vim_dev* *vimdev*
For discussions about changing Vim: New features, porting, patches,
beta-test versions, etc.
-<vim-announce@vim.org> *vim-announce*
+<vim-announce@vim.org> *vim-announce* *vim_announce*
Announcements about new versions of Vim; also for beta-test versions
and ports to different systems. This is a read-only list.
-<vim-multibyte@vim.org> *vim-multibyte*
- For discussions about using and improving the multi-byte aspects of
- Vim.
-<vim-mac@vim.org> *vim-mac*
+<vim-mac@vim.org> *vim-mac* *vim_mac*
For discussions about using and improving the Macintosh version of
Vim.
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index e619cfde30..e6bd6ae506 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -124,8 +124,9 @@ closed properly. Mostly harmless.
Command too recursive
This happens when an Ex command executes an Ex command that executes an Ex
-command, etc. This is only allowed 200 times. When it's more there probably
-is an endless loop. Probably a |:execute| or |:source| command is involved.
+command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
+larger. When it's more there probably is an endless loop. Probably a
+|:execute| or |:source| command is involved.
*E254* >
Cannot allocate color {name}
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d3683f5135..cef966e8a3 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3972,6 +3972,8 @@ A jump table for the options with a short description can be found at |Q_op|.
catches endless recursion. When using a recursive function with
more depth, set 'maxfuncdepth' to a bigger number. But this will use
more memory, there is the danger of failing when memory is exhausted.
+ Increasing this limit above 200 also changes the maximum for Ex
+ command resursion, see |E169|.
See also |:function|.
*'maxmapdepth'* *'mmd'* *E223*
@@ -4083,7 +4085,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
- Can be reset with the |-M| command line argument.
+ Can be reset on startup with the |-M| command line argument.
*'modified'* *'mod'* *'nomodified'* *'nomod'*
'modified' 'mod' boolean (default off)
@@ -4376,7 +4378,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'paste'* *'nopaste'*
'paste' boolean (default off)
global
- You probably don't have to set this option: |bracketed-paste-mode|.
+ This option is obsolete; |bracketed-paste-mode| is built-in.
Put Vim in Paste mode. This is useful if you want to cut or copy
some text from one window and paste it in Vim. This will avoid
@@ -4654,6 +4656,7 @@ A jump table for the options with a short description can be found at |Q_op|.
buffer, unless the 'Z' flag is in 'cpoptions'.
When using the ":view" command the 'readonly' option is
set for the newly edited buffer.
+ See 'modifiable' for disallowing changes to the buffer.
*'redrawtime'* *'rdt'*
'redrawtime' 'rdt' number (default 2000)
diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt
index a2497c89f9..f024db1260 100644
--- a/runtime/doc/pi_gzip.txt
+++ b/runtime/doc/pi_gzip.txt
@@ -26,6 +26,7 @@ with these extensions:
*.lzma lzma
*.xz xz
*.lz lzip
+ *.zst zstd
That's actually the only thing you need to know. There are no options.
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 420f570c99..75a47e55ce 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -1027,6 +1027,8 @@ Short explanation of each option: *option-list*
|c_<Up>| <Up>/<Down> recall older/newer command-line that starts
with current command
|c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history
+|c_CTRL-G| CTRL-G next match when 'incsearch' is active
+|c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|:history| :his[tory] show older command-lines
Context-sensitive completion on the command-line:
diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt
index fba5275f47..93c704a8ba 100644
--- a/runtime/doc/scroll.txt
+++ b/runtime/doc/scroll.txt
@@ -108,7 +108,8 @@ z^ Without [count]: Redraw with the line just above the
3. Scrolling relative to cursor *scroll-cursor*
The following commands reposition the edit window (the part of the buffer that
-you see) while keeping the cursor on the same line:
+you see) while keeping the cursor on the same line. Note that the 'scrolloff'
+option may cause context lines to show above and below the cursor.
*z<CR>*
z<CR> Redraw, line [count] at top of window (default
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index edb0770313..5822510a8a 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -181,6 +181,7 @@ argument.
the executable "view" has the same effect as the -R argument.
The 'updatecount' option will be set to 10000, meaning that
the swap file will not be updated automatically very often.
+ See |-M| for disallowing modifications.
*-m*
-m Modifications not allowed to be written. The 'write' option
@@ -734,7 +735,7 @@ There are several ways to exit Vim:
- Use `:cquit`. Also when there are changes.
When using `:cquit` or when there was an error message Vim exits with exit
-code 1. Errors can be avoided by using `:silent!`.
+code 1. Errors can be avoided by using `:silent!` or with `:catch`.
==============================================================================
6. Saving settings *save-settings*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 9c0f1cd989..eb79ffc865 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1472,7 +1472,7 @@ algorithm should work in the vast majority of cases. In some cases, such as a
file that begins with 500 or more full-line comments, the script may
incorrectly decide that the fortran code is in fixed form. If that happens,
just add a non-comment statement beginning anywhere in the first five columns
-of the first twenty five lines, save (:w) and then reload (:e!) the file.
+of the first twenty-five lines, save (:w) and then reload (:e!) the file.
Tabs in fortran files ~
Tabs are not recognized by the Fortran standards. Tabs are not a good idea in
@@ -2920,6 +2920,13 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: >
The default is to use the twice sh_minlines. Set it to a smaller number to
speed up displaying. The disadvantage is that highlight errors may appear.
+syntax/sh.vim tries to flag certain problems as errors; usually things like
+extra ']'s, 'done's, 'fi's, etc. If you find the error handling problematic
+for your purposes, you may suppress such error highlighting by putting
+the following line in your .vimrc: >
+
+ let g:sh_no_error= 1
+<
*sh-embed* *sh-awk*
Sh: EMBEDDING LANGUAGES~
@@ -3222,11 +3229,11 @@ syntax highlighting script handles this with the following logic:
* If g:tex_stylish exists and is 1
then the file will be treated as a "sty" file, so the "_"
will be allowed as part of keywords
- (irregardless of g:tex_isk)
+ (regardless of g:tex_isk)
* Else if the file's suffix is sty, cls, clo, dtx, or ltx,
then the file will be treated as a "sty" file, so the "_"
will be allowed as part of keywords
- (irregardless of g:tex_isk)
+ (regardless of g:tex_isk)
* If g:tex_isk exists, then it will be used for the local 'iskeyword'
* Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255
@@ -3454,6 +3461,8 @@ DEFINING CASE *:syn-case* *E390*
"ignore". Note that any items before this are not affected, and all
items until the next ":syntax case" command are affected.
+:sy[ntax] case
+ Show either "syntax case match" or "syntax case ignore" (translated).
SPELL CHECKING *:syn-spell*
@@ -3471,6 +3480,11 @@ SPELL CHECKING *:syn-spell*
To activate spell checking the 'spell' option must be set.
+:sy[ntax] spell
+ Show either "syntax spell toplevel", "syntax spell notoplevel" or
+ "syntax spell default" (translated).
+
+
SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
:sy[ntax] iskeyword [clear | {option}]
@@ -4064,6 +4078,9 @@ IMPLICIT CONCEAL *:syn-conceal-implicit*
off" returns to the normal state where the "conceal" flag must be
given explicitly.
+:sy[ntax] conceal
+ Show either "syntax conceal on" or "syntax conceal off" (translated).
+
==============================================================================
7. Syntax patterns *:syn-pattern* *E401* *E402*
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
index 5ee71d7aab..60bd864bcc 100644
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -131,10 +131,14 @@ something else.
:tabc[lose][!] {count}
Close tab page {count}. Fails in the same way as `:tabclose`
above. >
- :-tabclose " close the previous tab page
- :+tabclose " close the next tab page
- :1tabclose " close the first tab page
- :$tabclose " close the last tab page
+ :-tabclose " close the previous tab page
+ :+tabclose " close the next tab page
+ :1tabclose " close the first tab page
+ :$tabclose " close the last tab page
+ :tabclose -2 " close the two previous tab page
+ :tabclose + " close the next tab page
+ :tabclose 3 " close the third tab page
+ :tabclose $ " close the last tab page
<
*:tabo* *:tabonly*
:tabo[nly][!] Close all other tab pages.
@@ -147,13 +151,20 @@ something else.
never abandoned, so changes cannot get lost. >
:tabonly " close all tab pages except the current one
-:{count}tabo[nly][!]
- Close all tab pages except the {count}th one. >
- :.tabonly " as above
- :-tabonly " close all tab pages except the previous one
- :+tabonly " close all tab pages except the next one
- :1tabonly " close all tab pages except the first one
- :$tabonly " close all tab pages except the last one.
+:tabo[nly][!] {count}
+ Close all tab pages except {count} one. >
+ :.tabonly " as above
+ :-tabonly " close all tab pages except the previous
+ " one
+ :+tabonly " close all tab pages except the next one
+ :1tabonly " close all tab pages except the first one
+ :$tabonly " close all tab pages except the last one
+ :tabonly - " close all tab pages except the previous
+ " one
+ :tabonly +2 " close all tab pages except the two next
+ " one
+ :tabonly 1 " close all tab pages except the first one
+ :tabonly $ " close all tab pages except the last one
SWITCHING TO ANOTHER TAB PAGE:
@@ -168,7 +179,20 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
Go to the next tab page. Wraps around from the last to the
first one.
+:{count}tabn[ext]
:tabn[ext] {count}
+ Go to tab page {count}. The first tab page has number one. >
+ :-tabnext " go to the previous tab page
+ :+tabnext " go to the next tab page
+ :+2tabnext " go to the two next tab page
+ :1tabnext " go to the first tab page
+ :$tabnext " go to the last tab page
+ :tabnext $ " as above
+ :tabnext - " go to the previous tab page
+ :tabnext -1 " as above
+ :tabnext + " go to the next tab page
+ :tabnext +1 " as above
+
{count}<C-PageDown>
{count}gt Go to tab page {count}. The first tab page has number one.
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 214975c5a1..4b96dd3330 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -221,13 +221,9 @@ Bracketed paste mode allows terminal emulators to distinguish between typed
text and pasted text.
For terminal emulators that support it, this mode is enabled by default. Thus
-you can paste text without Neovim giving any special meaning to it. Most
-notably it won't try reindenting those lines.
-
-If your terminal emulator doesn't support it yet, you can get the old Vim
-behaviour by enabling |'paste'| temporarily.
-
-NOTE: See https://cirw.in/blog/bracketed-paste for technical details.
+you can paste text without Nvim giving any special meaning to it, e.g. it will
+not auto-indent the pasted text. See https://cirw.in/blog/bracketed-paste for
+technical details.
*mouse-mode-table* *mouse-overview*
A short overview of what the mouse buttons do, when 'mousemodel' is "extend":
diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt
index f2e523e784..5a7f0cb0e5 100644
--- a/runtime/doc/usr_03.txt
+++ b/runtime/doc/usr_03.txt
@@ -182,7 +182,7 @@ the following:
This tells you that you might want to fix something on line 33. So how do you
find line 33? One way is to do "9999k" to go to the top of the file and "32j"
-to go down thirty two lines. It is not a good way, but it works. A much
+to go down thirty-two lines. It is not a good way, but it works. A much
better way of doing things is to use the "G" command. With a count, this
command positions you at the given line number. For example, "33G" puts you
on line 33. (For a better way of going through a compiler's error list, see
diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt
index 8d11be11b2..255211f668 100644
--- a/runtime/doc/usr_22.txt
+++ b/runtime/doc/usr_22.txt
@@ -93,7 +93,7 @@ browser. This is what you get: >
o................Browsing with a Horizontal Split...........|netrw-o|
p................Use Preview Window.........................|netrw-p|
P................Edit in Previous Window....................|netrw-p|
- q................Listing Bookmarks and History..............|netrw-q|
+ q................Listing Bookmarks and History..............|netrw-qb|
r................Reversing Sorting Order....................|netrw-r|
< (etc)
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 77c238ae97..1d09b532a4 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -952,6 +952,7 @@ Various: *various-functions*
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
+ pyxeval() evaluate |python_x| expression
==============================================================================
*41.7* Defining a function
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 03feb47cbd..4c5f6815d7 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -100,8 +100,6 @@ editor. Even "legacy" Python and Ruby plugins which use the old Vim interfaces
FEATURES ~
-|bracketed-paste-mode| is built-in and enabled by default.
-
|META| (ALT) chords are recognized, even in the terminal. Any |<M-| mapping
will work. Some examples: <M-1>, <M-2>, <M-BS>, <M-Del>, <M-Ins>, <M-/>,
<M-\>, <M-Space>, <M-Enter>, <M-=>, <M-->, <M-?>, <M-$>, ...
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 3e502ca362..7d0f9cf779 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: 2016 Oct 31
+" Last Change: 2017 Jan 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -305,7 +305,10 @@ au BufNewFile,BufRead *.bl setf blank
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
" Bazel (http://bazel.io)
-autocmd BufRead,BufNewFile *.bzl,BUILD,WORKSPACE setfiletype bzl
+autocmd BufRead,BufNewFile *.bzl,WORKSPACE setfiletype bzl
+if has("fname_case")
+ autocmd BufRead,BufNewFile BUILD setfiletype bzl
+endif
" C or lpc
au BufNewFile,BufRead *.c call s:FTlpc()
@@ -669,8 +672,14 @@ au BufNewFile,BufRead *.dtd setf dtd
" DTS/DSTI (device tree files)
au BufNewFile,BufRead *.dts,*.dtsi setf dts
-" EDIF (*.edf,*.edif,*.edn,*.edo)
-au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
+" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
+au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
+au BufNewFile,BufRead *.edn
+ \ if getline(1) =~ '^\s*(\s*edif\>' |
+ \ setf edif |
+ \ else |
+ \ setf clojure |
+ \ endif
" EditorConfig (close enough to dosini)
au BufNewFile,BufRead .editorconfig setf dosini
diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim
new file mode 100644
index 0000000000..dcefc85ec3
--- /dev/null
+++ b/runtime/ftplugin/awk.vim
@@ -0,0 +1,18 @@
+" Vim filetype plugin
+" Language: awk, nawk, gawk, mawk
+" Maintainer: Antonio Colombo <azc100@gmail.com>
+" Last Change: 2017 Feb 17
+
+" This plugin was prepared by Mark Sikora
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+ finish
+endif
+
+" Don't load another plugin for this buffer
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl commentstring<"
+
+setlocal commentstring=#\ %s
diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim
index c9bee78a6e..2ba69e86df 100644
--- a/runtime/indent/fortran.vim
+++ b/runtime/indent/fortran.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: 0.46
-" Last Change: 2016 Sep. 27
+" Version: 47
+" Last Change: 2016 Oct. 29
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-indent from Vim
" Credits:
@@ -100,9 +100,9 @@ function FortranGetIndent(lnum)
endif
endif
- "Add a shiftwidth to statements following if, else, else if, case,
+ "Add a shiftwidth to statements following if, else, else if, case, class,
"where, else where, forall, type, interface and associate statements
- if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>'
+ if prevstat =~? '^\s*\(case\|class\|else\|else\s*if\|else\s*where\)\>'
\ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>'
\ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>'
\ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
@@ -136,11 +136,11 @@ function FortranGetIndent(lnum)
endif
endif
- "Subtract a shiftwidth from else, else if, elsewhere, case, end if,
+ "Subtract a shiftwidth from else, else if, elsewhere, case, class, end if,
" end where, end select, end forall, end interface, end associate,
" end enum, end type, end block and end type statements
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
- \. '\(else\|else\s*if\|else\s*where\|case\|'
+ \. '\(else\|else\s*if\|else\s*where\|case\|class\|'
\. 'end\s*\(if\|where\|select\|interface\|'
\. 'type\|forall\|associate\|enum\|block\)\)\>'
let ind = ind - shiftwidth()
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index 13adaae54c..57ba53ecd4 100644
--- a/runtime/indent/html.vim
+++ b/runtime/indent/html.vim
@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
-" Last Change: 2016 Mar 30
+" Last Change: 2017 Jan 17
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -25,27 +25,22 @@
if exists("b:did_indent") "{{{
finish
endif
+
+" Load the Javascript indent script first, it defines GetJavascriptIndent().
+" Undo the rest.
+" Load base python indent.
+if !exists('*GetJavascriptIndent')
+ runtime! indent/javascript.vim
+endif
let b:did_indent = 1
setlocal indentexpr=HtmlIndent()
setlocal indentkeys=o,O,<Return>,<>>,{,},!^F
-" "j1" is included to make cindent() work better with Javascript.
-setlocal cino=j1
-" "J1" should be included, but it doen't work properly before 7.4.355.
-if has("patch-7.4.355")
- setlocal cino+=J1
-endif
-" Before patch 7.4.355 indenting after "(function() {" does not work well, add
-" )2 to limit paren search.
-if !has("patch-7.4.355")
- setlocal cino+=)2
-endif
-
" Needed for % to work when finding start/end of a tag.
setlocal matchpairs+=<:>
-let b:undo_indent = "setlocal inde< indk< cino<"
+let b:undo_indent = "setlocal inde< indk<"
" b:hi_indent keeps state to speed up indenting consecutive lines.
let b:hi_indent = {"lnum": -1}
@@ -596,7 +591,7 @@ func! s:Alien3()
return eval(b:hi_js1indent)
endif
if b:hi_indent.scripttype == "javascript"
- return cindent(v:lnum)
+ return GetJavascriptIndent()
else
return -1
endif
diff --git a/runtime/indent/javascript.vim b/runtime/indent/javascript.vim
index 0d6c11d151..a6f1e1a8f8 100644
--- a/runtime/indent/javascript.vim
+++ b/runtime/indent/javascript.vim
@@ -2,7 +2,7 @@
" Language: Javascript
" Maintainer: Chris Paul ( https://github.com/bounceme )
" URL: https://github.com/pangloss/vim-javascript
-" Last Change: August 25, 2016
+" Last Change: December 31, 2016
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -12,11 +12,10 @@ let b:did_indent = 1
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJavascriptIndent()
-setlocal nolisp noautoindent nosmartindent
-setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e
-setlocal cinoptions+=j1,J1
+setlocal autoindent nolisp nosmartindent
+setlocal indentkeys+=0],0)
-let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys< cinoptions<'
+let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<'
" Only define the function once.
if exists('*GetJavascriptIndent')
@@ -37,158 +36,329 @@ else
endfunction
endif
-let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>'
-let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:'
-" Regex of syntax group names that are or delimit string or are comments.
-let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
-
-" Regex of syntax group names that are strings or documentation.
-let s:syng_comment = '\%(comment\|doc\)'
-
-" Expression used to check whether we should skip a match with searchpair().
-let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
-
+" searchpair() wrapper
if has('reltime')
- function s:GetPair(start,end,flags,time)
- return searchpair(a:start,'',a:end,a:flags,s:skip_expr,max([prevnonblank(v:lnum) - 2000,0]),a:time)
+ function s:GetPair(start,end,flags,skip,time,...)
+ return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time)
endfunction
else
- function s:GetPair(start,end,flags,n)
- return searchpair(a:start,'',a:end,a:flags,0,max([prevnonblank(v:lnum) - 2000,0]))
+ function s:GetPair(start,end,flags,skip,...)
+ return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)]))
endfunction
endif
-let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$'
+" Regex of syntax group names that are or delimit string or are comments.
+let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template'
+let s:syng_str = 'string\|template'
+let s:syng_com = 'comment\|doc'
+" Expression used to check whether we should skip a match with searchpair().
+let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
-" configurable regexes that define continuation lines, not including (, {, or [.
-if !exists('g:javascript_opfirst')
- let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\/[^/*]\|\([-.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)'
-endif
-if !exists('g:javascript_continuation')
- let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)'
-endif
+function s:skip_func()
+ if !s:free || search('\m`\|\*\/','nW',s:looksyn)
+ let s:free = !eval(s:skip_expr)
+ let s:looksyn = s:free ? line('.') : s:looksyn
+ return !s:free
+ endif
+ let s:looksyn = line('.')
+ return (search('\m\/','nbW',s:looksyn) || search('\m[''"]\|\\$','nW',s:looksyn)) && eval(s:skip_expr)
+endfunction
-let g:javascript_opfirst = s:line_pre . g:javascript_opfirst
-let g:javascript_continuation .= s:line_term
+function s:alternatePair(stop)
+ let pos = getpos('.')[1:2]
+ while search('\m[][(){}]','bW',a:stop)
+ if !s:skip_func()
+ let idx = stridx('])}',s:looking_at())
+ if idx + 1
+ if !s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop)
+ break
+ endif
+ else
+ return
+ endif
+ endif
+ endwhile
+ call call('cursor',pos)
+endfunction
-function s:OneScope(lnum,text,add)
- return a:text =~# '\%(\<else\|\<do\|=>\)' . s:line_term ? 'no b' :
- \ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
- \ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) &&
- \ s:GetPair('(', ')', 'cbW', 100) > 0 && search('\C\l\+\_s*\%#','bW') &&
- \ (a:add || ((expand('<cword>') !=# 'while' || !s:GetPair('\C\<do\>', '\C\<while\>','nbW',100)) &&
- \ (expand('<cword>') !=# 'each' || search('\C\<for\_s\+\%#','nbW')))) ? expand('<cword>') : ''
+function s:save_pos(f,...)
+ let l:pos = getpos('.')[1:2]
+ let ret = call(a:f,a:000)
+ call call('cursor',l:pos)
+ return ret
endfunction
-" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
-function s:IsBlock()
- return getline(line('.'))[col('.')-1] == '{' && !search(
- \ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
- \ (!search(':\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','bW',200) || s:IsBlock()))
+function s:syn_at(l,c)
+ return synIDattr(synID(a:l,a:c,0),'name')
+endfunction
+
+function s:looking_at()
+ return getline('.')[col('.')-1]
+endfunction
+
+function s:token()
+ return s:looking_at() =~ '\k' ? expand('<cword>') : s:looking_at()
+endfunction
+
+function s:b_token()
+ if s:looking_at() =~ '\k'
+ call search('\m\<','cbW')
+ endif
+ return search('\m\S','bW')
+endfunction
+
+function s:previous_token()
+ let l:n = line('.')
+ while s:b_token()
+ if (s:looking_at() == '/' || line('.') != l:n && search('\m\/\/','nbW',
+ \ line('.'))) && s:syn_at(line('.'),col('.')) =~? s:syng_com
+ call search('\m\_[^/]\zs\/[/*]','bW')
+ else
+ return s:token()
+ endif
+ endwhile
+ return ''
+endfunction
+
+function s:others(p)
+ return "((line2byte(line('.')) + col('.')) <= ".(line2byte(a:p[0]) + a:p[1]).") || ".s:skip_expr
+endfunction
+
+function s:tern_skip(p)
+ return s:GetPair('{','}','nbW',s:others(a:p),200,a:p[0]) > 0
+endfunction
+
+function s:tern_col(p)
+ return s:GetPair('?',':\@<!::\@!','nbW',s:others(a:p)
+ \ .' || s:tern_skip('.string(a:p).')',200,a:p[0]) > 0
+endfunction
+
+function s:label_col()
+ let pos = getpos('.')[1:2]
+ let [s:looksyn,s:free] = pos
+ call s:alternatePair(0)
+ if s:save_pos('s:IsBlock')
+ let poss = getpos('.')[1:2]
+ return call('cursor',pos) || !s:tern_col(poss)
+ elseif s:looking_at() == ':'
+ return !s:tern_col([0,0])
+ endif
+endfunction
+
+" configurable regexes that define continuation lines, not including (, {, or [.
+let s:opfirst = '^' . get(g:,'javascript_opfirst',
+ \ '\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)')
+let s:continuation = get(g:,'javascript_continuation',
+ \ '\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|delete\|void\|in\|instanceof\)\)') . '$'
+
+function s:continues(ln,con)
+ return !cursor(a:ln, match(' '.a:con,s:continuation)) &&
+ \ eval((['s:syn_at(line("."),col(".")) !~? "regex"'] +
+ \ repeat(['s:previous_token() != "."'],5) + [1])[
+ \ index(split('/ typeof in instanceof void delete'),s:token())])
endfunction
-" Auxiliary Functions {{{2
+" get the line of code stripped of comments and move cursor to the last
+" non-comment char.
+function s:Trim(ln)
+ let pline = substitute(getline(a:ln),'\s*$','','')
+ let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
+ while l:max && s:syn_at(a:ln, strlen(pline)) =~? s:syng_com
+ let pline = substitute(strpart(pline, 0, l:max),'\s*$','','')
+ let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
+ endwhile
+ return cursor(a:ln,strlen(pline)) ? pline : pline
+endfunction
-" Find line above 'lnum' that isn't empty, in a comment, or in a string.
+" Find line above 'lnum' that isn't empty or in a comment
function s:PrevCodeLine(lnum)
- let l:lnum = prevnonblank(a:lnum)
- while l:lnum
- if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"]'),0),'name') !~? s:syng_strcom
- return l:lnum
+ let l:n = prevnonblank(a:lnum)
+ while l:n
+ if getline(l:n) =~ '^\s*\/[/*]'
+ if (stridx(getline(l:n),'`') > 0 || getline(l:n-1)[-1:] == '\') &&
+ \ s:syn_at(l:n,1) =~? s:syng_str
+ return l:n
+ endif
+ let l:n = prevnonblank(l:n-1)
+ elseif s:syn_at(l:n,1) =~? s:syng_com
+ let l:n = s:save_pos('eval',
+ \ 'cursor('.l:n.',1) + search(''\m\/\*'',"bW")')
+ else
+ return l:n
endif
- let l:lnum = prevnonblank(l:lnum - 1)
endwhile
endfunction
" Check if line 'lnum' has a balanced amount of parentheses.
function s:Balanced(lnum)
- let [open_0,open_2,open_4] = [0,0,0]
+ let l:open = 0
let l:line = getline(a:lnum)
let pos = match(l:line, '[][(){}]', 0)
while pos != -1
- if synIDattr(synID(a:lnum,pos + 1,0),'name') !~? s:syng_strcom
- let idx = stridx('(){}[]', l:line[pos])
- if idx % 2 == 0
- let open_{idx} = open_{idx} + 1
- else
- let open_{idx - 1} = open_{idx - 1} - 1
+ if s:syn_at(a:lnum,pos + 1) !~? s:syng_strcom
+ let l:open += match(' ' . l:line[pos],'[[({]')
+ if l:open < 0
+ return
endif
endif
let pos = match(l:line, '[][(){}]', pos + 1)
endwhile
- return (!open_4 + !open_2 + !open_0) - 2
+ return !l:open
endfunction
-" }}}
-function GetJavascriptIndent()
- if !exists('b:js_cache')
- let b:js_cache = [0,0,0]
+function s:OneScope(lnum)
+ let pline = s:Trim(a:lnum)
+ let kw = 'else do'
+ if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
+ call s:previous_token()
+ let kw = 'for if let while with'
+ if index(split('await each'),s:token()) + 1
+ call s:previous_token()
+ let kw = 'for'
+ endif
+ endif
+ return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 &&
+ \ s:save_pos('s:previous_token') != '.'
+endfunction
+
+" returns braceless levels started by 'i' and above lines * &sw. 'num' is the
+" lineNr which encloses the entire context, 'cont' if whether line 'i' + 1 is
+" a continued expression, which could have started in a braceless context
+function s:iscontOne(i,num,cont)
+ let [l:i, l:num, bL] = [a:i, a:num + !a:num, 0]
+ let pind = a:num ? indent(l:num) + s:W : 0
+ let ind = indent(l:i) + (a:cont ? 0 : s:W)
+ while l:i >= l:num && (ind > pind || l:i == l:num)
+ if indent(l:i) < ind && s:OneScope(l:i)
+ let bL += s:W
+ let l:i = line('.')
+ elseif !a:cont || bL || ind < indent(a:i)
+ break
+ endif
+ let ind = min([ind, indent(l:i)])
+ let l:i = s:PrevCodeLine(l:i - 1)
+ endwhile
+ return bL
+endfunction
+
+" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
+function s:IsBlock()
+ if s:looking_at() == '{'
+ let l:n = line('.')
+ let char = s:previous_token()
+ let syn = char =~ '[{>/]' ? s:syn_at(line('.'),col('.')-(char == '{')) : ''
+ if syn =~? 'xml\|jsx'
+ return char != '{'
+ elseif char =~ '\k'
+ return index(split('return const let import export yield default delete var await void typeof throw case new in instanceof')
+ \ ,char) < (line('.') != l:n) || s:previous_token() == '.'
+ elseif char == '>'
+ return getline('.')[col('.')-2] == '=' || syn =~? '^jsflow'
+ elseif char == ':'
+ return getline('.')[col('.')-2] != ':' && s:label_col()
+ endif
+ return syn =~? 'regex' || char !~ '[-=~!<*+,/?^%|&([]'
endif
+endfunction
+
+function GetJavascriptIndent()
+ let b:js_cache = get(b:,'js_cache',[0,0,0])
" Get the current line.
- let l:line = getline(v:lnum)
- let syns = synIDattr(synID(v:lnum, 1, 0), 'name')
+ call cursor(v:lnum,1)
+ let l:line = getline('.')
+ let syns = s:syn_at(v:lnum, 1)
- " start with strings,comments,etc.{{{2
- if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') ||
- \ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment)
+ " start with strings,comments,etc.
+ if syns =~? s:syng_com
+ if l:line =~ '^\s*\*'
+ return cindent(v:lnum)
+ elseif l:line !~ '^\s*\/[/*]'
+ return -1
+ endif
+ elseif syns =~? s:syng_str && l:line !~ '^[''"]'
+ if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1)
+ let b:js_cache[0] = v:lnum
+ endif
return -1
endif
- if l:line !~ '^\%(\/\*\|\s*\/\/\)' && syns =~? s:syng_comment
- return cindent(v:lnum)
- endif
let l:lnum = s:PrevCodeLine(v:lnum - 1)
- if l:lnum == 0
- return 0
+ if !l:lnum
+ return
endif
- if (l:line =~# s:expr_case)
- let cpo_switch = &cpo
- set cpo+=%
- let ind = cindent(v:lnum)
- let &cpo = cpo_switch
- return ind
+ let l:line = substitute(l:line,'^\s*','','')
+ if l:line[:1] == '/*'
+ let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','')
+ endif
+ if l:line =~ '^\/[/*]'
+ let l:line = ''
endif
- "}}}
- " the containing paren, bracket, curly. Memoize, last lineNr either has the
- " same scope or starts a new one, unless if it closed a scope.
- call cursor(v:lnum,1)
- if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] &&
- \ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0)
- let num = b:js_cache[1]
- elseif syns != '' && l:line[0] =~ '\s'
- let pattern = syns =~? 'block' ? ['{','}'] : syns =~? 'jsparen' ? ['(',')'] :
- \ syns =~? 'jsbracket'? ['\[','\]'] : ['[({[]','[])}]']
- let num = s:GetPair(pattern[0],pattern[1],'bW',2000)
+ " the containing paren, bracket, or curly. Many hacks for performance
+ let idx = strlen(l:line) ? stridx('])}',l:line[0]) : -1
+ if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum &&
+ \ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum))
+ call call('cursor',b:js_cache[1:])
else
- let num = s:GetPair('[({[]','[])}]','bW',2000)
+ let [s:looksyn, s:free, top] = [v:lnum - 1, 1, (!indent(l:lnum) &&
+ \ s:syn_at(l:lnum,1) !~? s:syng_str) * l:lnum]
+ if idx + 1
+ call s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,top)
+ elseif indent(v:lnum) && syns =~? 'block'
+ call s:GetPair('{','}','bW','s:skip_func()',2000,top)
+ else
+ call s:alternatePair(top)
+ endif
endif
- let b:js_cache = [v:lnum,num,line('.') == v:lnum ? b:js_cache[2] : col('.')]
- if l:line =~ s:line_pre . '[])}]'
- return indent(num)
+ if idx + 1 || l:line[:1] == '|}'
+ if idx == 2 && search('\m\S','bW',line('.')) && s:looking_at() == ')'
+ call s:GetPair('(',')','bW',s:skip_expr,200)
+ endif
+ return indent('.')
endif
- call cursor(b:js_cache[1],b:js_cache[2])
-
- let swcase = getline(l:lnum) =~# s:expr_case
- let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@<!\/\/.*\)$', '','')
- let inb = num == 0 || num < l:lnum && ((l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term) || s:IsBlock())
- let switch_offset = num == 0 || s:OneScope(num, strpart(getline(num),0,b:js_cache[2] - 1),1) !=# 'switch' ? 0 :
- \ &cino !~ ':' || !has('float') ? s:sw() :
- \ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
-
- " most significant, find the indent amount
- if inb && !swcase && ((l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation) ||
- \ num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
- \ l:line !~ s:line_pre . '{')
- return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
- elseif num > 0
- return indent(num) + s:sw() + switch_offset
+ let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2])
+ let num = b:js_cache[1]
+
+ let [s:W, isOp, bL, switch_offset] = [s:sw(),0,0,0]
+ if !num || s:IsBlock()
+ let pline = s:save_pos('s:Trim',l:lnum)
+ if num && s:looking_at() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
+ let num = line('.')
+ if s:previous_token() ==# 'switch' && s:previous_token() != '.'
+ if &cino !~ ':' || !has('float')
+ let switch_offset = s:W
+ else
+ let cinc = matchlist(&cino,'.*:\(-\)\=\([0-9.]*\)\(s\)\=\C')
+ let switch_offset = float2nr(str2float(cinc[1].(strlen(cinc[2]) ? cinc[2] : strlen(cinc[3])))
+ \ * (strlen(cinc[3]) ? s:W : 1))
+ endif
+ if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>'
+ return indent(num) + switch_offset
+ endif
+ endif
+ endif
+ if pline[-1:] !~ '[{;]'
+ if pline =~# ':\@<!:$'
+ call cursor(l:lnum,strlen(pline))
+ let isOp = s:tern_col(b:js_cache[1:2])
+ else
+ let isOp = l:line =~# s:opfirst || s:continues(l:lnum,pline)
+ endif
+ let bL = s:iscontOne(l:lnum,num,isOp)
+ let bL -= (bL && l:line[0] == '{') * s:W
+ endif
endif
+ " main return
+ if isOp
+ return (num ? indent(num) : -s:W) + (s:W * 2) + switch_offset + bL
+ elseif num
+ return indent(num) + s:W + switch_offset + bL
+ endif
+ return bL
endfunction
-
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/keymap/armenian-eastern_utf-8.vim b/runtime/keymap/armenian-eastern_utf-8.vim
index 7b03c5ac73..eaa60a77f8 100644
--- a/runtime/keymap/armenian-eastern_utf-8.vim
+++ b/runtime/keymap/armenian-eastern_utf-8.vim
@@ -1,5 +1,5 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
-" Last Changed: 2016 July 20
+" Last Changed: 2016 December 5
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
@@ -98,6 +98,8 @@ f ֆ
7 .
8 «
9 »
+* (
+( )
\\ '
| ՞
diff --git a/runtime/keymap/armenian-western_utf-8.vim b/runtime/keymap/armenian-western_utf-8.vim
index e02485ed8c..cf3efdc00f 100644
--- a/runtime/keymap/armenian-western_utf-8.vim
+++ b/runtime/keymap/armenian-western_utf-8.vim
@@ -1,5 +1,5 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
-" Last Changed: 2016 July 20
+" Last Changed: 2016 December 5
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
@@ -98,6 +98,8 @@ f ֆ
7 .
8 «
9 »
+* (
+( )
\\ '
| ՞
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 7cb530a331..37e9d8733b 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Jul 27
+" Last Change: 2017 Feb 09
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -475,7 +475,7 @@ if has("folding")
an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm
an 40.340.140 &Tools.&Folding.&Close\ all\ folds<Tab>zM zM
an 40.340.150 &Tools.&Folding.O&pen\ more\ folds<Tab>zr zr
- an 40.340.160 &Tools.&Folding.&Open\ all\ folds<Tab>zR zR
+ an 40.340.160 &Tools.&Folding.&Open\ All\ Folds<Tab>zR zR
" fold method
an 40.340.200 &Tools.&Folding.-SEP1- <Nop>
an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual<CR>
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 36d1741362..5c883babc1 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Aug 21
+" Last Change: 2017 Jan 28
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim
index f7ee9dc510..5e13b92d1e 100644
--- a/runtime/plugin/gzip.vim
+++ b/runtime/plugin/gzip.vim
@@ -20,29 +20,33 @@ augroup gzip
"
" Set binary mode before reading the file.
" Use "gzip -d", gunzip isn't always available.
- autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz setlocal bin
+ autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
+ autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
+ autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
+ autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
autocmd FileAppendPost *.gz call gzip#write("gzip")
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
autocmd FileAppendPost *.Z call gzip#write("compress -f")
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
autocmd FileAppendPost *.xz call gzip#write("xz -z")
autocmd FileAppendPost *.lz call gzip#write("lzip")
+ autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
augroup END
diff --git a/runtime/syntax/autohotkey.vim b/runtime/syntax/autohotkey.vim
index 764f94b11a..3b826af6f5 100644
--- a/runtime/syntax/autohotkey.vim
+++ b/runtime/syntax/autohotkey.vim
@@ -1,8 +1,10 @@
" Vim syntax file
" Language: AutoHotkey script file
-" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2015-10-29
+" Maintainer: Michael Wong
+" https://github.com/mmikeww/autohotkey.vim
+" Latest Revision: 2017-01-23
+" Previous Maintainers: SungHyun Nam <goweol@gmail.com>
+" Nikolai Weibull <now@bitwi.se>
if exists("b:current_syntax")
finish
@@ -17,68 +19,11 @@ syn keyword autohotkeyTodo
\ contained
\ TODO FIXME XXX NOTE
-syn cluster autohotkeyCommentGroup
- \ contains=
- \ autohotkeyTodo,
- \ @Spell
-
-syn match autohotkeyComment
- \ display
- \ contains=@autohotkeyCommentGroup
- \ '`\@<!;.*$'
-
-syn region autohotkeyComment
- \ contains=@autohotkeyCommentGroup
- \ matchgroup=autohotkeyCommentStart
- \ start='/\*'
- \ end='\*/'
-
+" only these chars are valid as escape sequences: ,%`;nrbtvaf
+" https://autohotkey.com/docs/commands/_EscapeChar.htm
syn match autohotkeyEscape
\ display
- \ '`.'
-
-syn match autohotkeyHotkey
- \ contains=autohotkeyKey,
- \ autohotkeyHotkeyDelimiter
- \ display
- \ '^.\{-}::'
-
-syn match autohotkeyKey
- \ contained
- \ display
- \ '^.\{-}'
-
-syn match autohotkeyDelimiter
- \ contained
- \ display
- \ '::'
-
-syn match autohotkeyHotstringDefinition
- \ contains=autohotkeyHotstring,
- \ autohotkeyHotstringDelimiter
- \ display
- \ '^:\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)*:.\{-}::'
-
-syn match autohotkeyHotstring
- \ contained
- \ display
- \ '.\{-}'
-
-syn match autohotkeyHotstringDelimiter
- \ contained
- \ display
- \ '::'
-
-syn match autohotkeyHotstringDelimiter
- \ contains=autohotkeyHotstringOptions
- \ contained
- \ display
- \ ':\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\):'
-
-syn match autohotkeyHotstringOptions
- \ contained
- \ display
- \ '\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)'
+ \ '`[,%`;nrbtvaf]'
syn region autohotkeyString
\ display
@@ -88,39 +33,46 @@ syn region autohotkeyString
\ end=+"+
\ contains=autohotkeyEscape
-syn region autohotkeyVariable
+syn match autohotkeyVariable
\ display
\ oneline
\ contains=autohotkeyBuiltinVariable
- \ matchgroup=autohotkeyVariableDelimiter
- \ start="%"
- \ end="%"
\ keepend
+ \ '%\S\{-}%'
syn keyword autohotkeyBuiltinVariable
\ A_Space A_Tab
- \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_LineNumber
- \ A_LineFile A_AhkVersion A_AhkPAth A_IsCompiled A_ExitReason
- \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YWeek A_Hour A_Min
+ \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_ScriptHwnd A_LineNumber
+ \ A_LineFile A_ThisFunc A_ThisLabel A_AhkVersion A_AhkPath A_IsUnicode A_IsCompiled A_ExitReason
+ \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YDay A_YWeek A_Hour A_Min
+ \ A_Mon A_Year A_MDay A_NumBatchLines
\ A_Sec A_MSec A_Now A_NowUTC A_TickCount
- \ A_IsSuspended A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
- \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_STringCaseSense
- \ A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
- \ A_MouseDelay A_DefaultMouseSpeed A_IconHidden A_IconTip A_IconFile
+ \ A_IsSuspended A_IsPaused A_IsCritical A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
+ \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_StringCaseSense
+ \ A_FileEncoding A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
+ \ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDelayDuration
+ \ A_KeyDelayPlay A_KeyDelayPlayDuration A_MouseDelayPlay
+ \ A_MouseDelay A_DefaultMouseSpeed A_RegView A_IconHidden A_IconTip A_IconFile
+ \ A_CoordModeToolTip A_CoordModePixel A_CoordModeMouse A_CoordModeCaret A_CoordModeMenu
\ A_IconNumber
- \ A_TimeIdle A_TimeIdlePhysical
+ \ A_TimeIdle A_TimeIdlePhysical A_DefaultGui A_DefaultListView A_DefaultTreeView
\ A_Gui A_GuiControl A_GuiWidth A_GuiHeight A_GuiX A_GuiY A_GuiEvent
\ A_GuiControlEvent A_EventInfo
\ A_ThisMenuItem A_ThisMenu A_ThisMenuItemPos A_ThisHotkey A_PriorHotkey
- \ A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar
+ \ A_PriorKey A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar
\ ComSpec A_Temp A_OSType A_OSVersion A_Language A_ComputerName A_UserName
+ \ A_Is64BitOS A_PtrSize
\ A_WinDir A_ProgramFiles ProgramFiles A_AppData A_AppDataCommon A_Desktop
\ A_DesktopCommon A_StartMenu A_StartMenuCommon A_Programs
\ A_ProgramsCommon A_Startup A_StartupCommon A_MyDocuments A_IsAdmin
- \ A_ScreenWidth A_ScreenHeight A_IPAddress1 A_IPAddress2 A_IPAddress3
+ \ A_ScreenWidth A_ScreenHeight A_ScreenDPI A_IPAddress1 A_IPAddress2 A_IPAddress3
\ A_IPAddress4
\ A_Cursor A_CaretX A_CaretY Clipboard ClipboardAll ErrorLevel A_LastError
\ A_Index A_LoopFileName A_LoopRegName A_LoopReadLine A_LoopField
+ \ A_LoopFileExt A_LoopFileFullPath A_LoopFileLongPath A_LoopFileShortPath
+ \ A_LoopFileShortName A_LoopFileDir A_LoopFileTimeModified A_LoopFileTimeCreated
+ \ A_LoopFileTimeAccessed A_LoopFileAttrib A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB
+ \ A_LoopRegType A_LoopRegKey A_LoopRegSubKey A_LoopRegTimeModified
syn match autohotkeyBuiltinVariable
\ contained
@@ -130,7 +82,7 @@ syn match autohotkeyBuiltinVariable
syn keyword autohotkeyCommand
\ ClipWait EnvGet EnvSet EnvUpdate
\ Drive DriveGet DriveSpaceFree FileAppend FileCopy FileCopyDir
- \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib
+ \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib FileEncoding
\ FileGetShortcut FileGetSize FileGetTime FileGetVersion FileInstall
\ FileMove FileMoveDir FileReadLine FileRead FileRecycle FileRecycleEmpty
\ FileRemoveDir FileSelectFolder FileSelectFile FileSetAttrib FileSetTime
@@ -153,7 +105,7 @@ syn keyword autohotkeyCommand
\ SoundSetWaveVolume
\ FormatTime IfInString IfNotInString Sort StringCaseSense StringGetPos
\ StringLeft StringRight StringLower StringUpper StringMid StringReplace
- \ StringSplit StringTrimLeft StringTrimRight
+ \ StringSplit StringTrimLeft StringTrimRight StringLen
\ Control ControlClick ControlFocus ControlGet ControlGetFocus
\ ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw
\ ControlSetText Menu PostMessage SendMessage SetControlDelay
@@ -164,12 +116,16 @@ syn keyword autohotkeyCommand
\ WinGetText WinGetTitle WinHide WinKill WinMaximize WinMinimize
\ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
\ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
+ \ SetCapsLockState SetNumLockState SetScrollLockState
syn keyword autohotkeyFunction
\ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr
\ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
\ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan
- \ FileExist GetKeyState
+ \ FileExist GetKeyState NumGet NumPut StrGet StrPut RegisterCallback
+ \ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen
+ \ ComObjActive ComObjArray ComObjConnect ComObjCreate ComObjGet
+ \ ComObjError ComObjFlags ComObjQuery ComObjType ComObjValue ComObject
syn keyword autohotkeyStatement
\ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
@@ -180,7 +136,9 @@ syn keyword autohotkeyRepeat
syn keyword autohotkeyConditional
\ IfExist IfNotExist If IfEqual IfLess IfGreater Else
- \ IfWinExist IfWinNotExist
+ \ IfWinExist IfWinNotExist IfWinActive IfWinNotActive
+ \ IfNotEqual IfLessOrEqual IfGreaterOrEqual
+ \ while until for in
syn match autohotkeyPreProcStart
\ nextgroup=
@@ -200,6 +158,7 @@ syn keyword autohotkeyPreProc
\ HotkeyInterval HotKeyModifierTimeout
\ Hotstring
\ IfWinActive IfWinNotActive IfWinExist IfWinNotExist
+ \ If IfTimeout
\ MaxHotkeysPerInterval MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey
\ UseHook InstallKeybdHook InstallMouseHook
\ KeyHistory
@@ -213,6 +172,10 @@ syn keyword autohotkeyPreProc
\ MaxMem
\ NoEnv
\ Persistent
+ \ LTrim
+ \ InputLevel
+ \ MenuMaskKey
+ \ Warn
syn keyword autohotkeyMatchClass
\ ahk_group ahk_class ahk_id ahk_pid
@@ -243,11 +206,74 @@ syn match autohotkeyFloat
syn keyword autohotkeyType
\ local
\ global
+ \ static
+ \ byref
syn keyword autohotkeyBoolean
\ true
\ false
+syn match autohotkeyHotkey
+ \ contains=autohotkeyKey,
+ \ autohotkeyHotkeyDelimiter
+ \ display
+ \ '^.\{-}::'
+
+syn match autohotkeyKey
+ \ contained
+ \ display
+ \ '^.\{-}'
+
+syn match autohotkeyDelimiter
+ \ contained
+ \ display
+ \ '::'
+
+" allowable hotstring options:
+" https://autohotkey.com/docs/Hotstrings.htm
+syn match autohotkeyHotstringDefinition
+ \ contains=autohotkeyHotstring,
+ \ autohotkeyHotstringDelimiter
+ \ display
+ \ '^\s*:\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:.\{-}::'
+
+syn match autohotkeyHotstring
+ \ contained
+ \ display
+ \ '.\{-}'
+
+syn match autohotkeyHotstringDelimiter
+ \ contained
+ \ display
+ \ '::'
+
+syn match autohotkeyHotstringDelimiter
+ \ contains=autohotkeyHotstringOptions
+ \ contained
+ \ display
+ \ ':\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:'
+
+syn match autohotkeyHotstringOptions
+ \ contained
+ \ display
+ \ '\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*'
+
+syn cluster autohotkeyCommentGroup
+ \ contains=
+ \ autohotkeyTodo,
+ \ @Spell
+
+syn match autohotkeyComment
+ \ display
+ \ contains=@autohotkeyCommentGroup
+ \ '\%(^;\|\s\+;\).*$'
+
+syn region autohotkeyComment
+ \ contains=@autohotkeyCommentGroup
+ \ matchgroup=autohotkeyCommentStart
+ \ start='^\s*/\*'
+ \ end='^\s*\*/'
+
" TODO: Shouldn't we look for g:, b:, variables before defaulting to
" something?
if exists("g:autohotkey_syntax_sync_minlines")
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 2b946dd73d..cc99f674a1 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Oct 27
+" Last Change: 2016 Nov 17
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -365,7 +365,7 @@ if !exists("c_no_if0")
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
- syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
+ syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif
diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim
index 3dc3f5c2d6..23db7b10e8 100644
--- a/runtime/syntax/css.vim
+++ b/runtime/syntax/css.vim
@@ -6,7 +6,8 @@
" Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim
-" Last Change: 2015 Apr.17
+" Last Change: 2017 Jan 14
+" cssClassName updated by Ryuichi Hayashida Jan 2016
" quit when a syntax file was already loaded
if !exists("main_syntax")
@@ -56,7 +57,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
" .class and #id
-syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot
+syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
syn match cssClassNameDot contained '\.'
try
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index a10e4ad342..eb02aaf4af 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2016 Aug 30
+" Last Change: 2016 Nov 12
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
" Standard syntax initialization
@@ -21,7 +21,7 @@ let binNMU='binary-only=yes'
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"'
-syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index b52c496c95..b1bc9f8bfe 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
-syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
+syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
syn match debcontrolPackageType contained "u\?deb"
syn match debcontrolVariable contained "\${.\{-}}"
syn match debcontrolDmUpload contained "\cyes"
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 2777944971..390c43035e 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2016 Sep 27
+" Last Change: 2016 Nov 12
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -25,7 +25,7 @@ let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\
- \ 'precise', 'trusty', 'xenial', 'yakkety', 'devel'
+ \ 'precise', 'trusty', 'xenial', 'yakkety', 'zesty', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index 9d9ab69a3a..4c26e78f16 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: 0.99
-" Last Change: 2016 Sep. 23
+" Version: 100
+" Last Change: 2016 Oct. 29
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@@ -397,6 +397,7 @@ if exists("fortran_fold")
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
else
@@ -406,6 +407,7 @@ if exists("fortran_fold")
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\s*[!#].*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
endif
@@ -415,12 +417,12 @@ if exists("fortran_fold")
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
else
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
- syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
+ syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
endif
endif
diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim
index 336d8c9f44..49d3ab4adb 100644
--- a/runtime/syntax/html.vim
+++ b/runtime/syntax/html.vim
@@ -1,9 +1,10 @@
" Vim syntax file
-" Language: HTML
-" Maintainer: Claudio Fleiner <claudio@fleiner.com>
-" URL: http://www.fleiner.com/vim/syntax/html.vim
-" Last Change: 2015 Jan 07
-" included patch from David Felix
+" Language: HTML
+" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
+" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
+" Repository: https://notabug.org/jorgesumle/vim-html-syntax
+" Last Change: 2017 Jan 21
+" included patch from Jorge Maldonado Ventura
" Please check :help html.vim for some comments and a description of the options
@@ -53,6 +54,14 @@ syn keyword htmlTagName contained abbr acronym bdo button col label
syn keyword htmlTagName contained colgroup del fieldset iframe ins legend
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
+" new html 5 tags
+syn keyword htmlTagName contained article aside audio bdi canvas data
+syn keyword htmlTagName contained datalist details embed figcaption figure
+syn keyword htmlTagName contained footer header hgroup keygen main mark
+syn keyword htmlTagName contained menuitem meter nav output picture
+syn keyword htmlTagName contained progress rb rp rt rtc ruby section
+syn keyword htmlTagName contained slot source template time track video wbr
+
" legal arg names
syn keyword htmlArg contained action
syn keyword htmlArg contained align alink alt archive background bgcolor
@@ -87,6 +96,19 @@ syn keyword htmlArg contained multiple nohref nowrap object profile readonly
syn keyword htmlArg contained rules scheme scope span standby style
syn keyword htmlArg contained summary tabindex valuetype version
+" html 5 arg names
+syn keyword htmlArg contained allowfullscreen async autocomplete autofocus
+syn keyword htmlArg contained autoplay challenge contenteditable contextmenu
+syn keyword htmlArg contained controls crossorigin default dirname download
+syn keyword htmlArg contained draggable dropzone form formaction formenctype
+syn keyword htmlArg contained formmethod formnovalidate formtarget hidden
+syn keyword htmlArg contained high icon inputmode keytype kind list loop low
+syn keyword htmlArg contained max min minlength muted nonce novalidate open
+syn keyword htmlArg contained optimum pattern placeholder poster preload
+syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck
+syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
+syn keyword htmlArg contained typemustmatch
+
" special characters
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim
index 92ffbbc1ed..5228bb5c43 100644
--- a/runtime/syntax/matlab.vim
+++ b/runtime/syntax/matlab.vim
@@ -1,11 +1,13 @@
" Vim syntax file
" Language: Matlab
-" Maintainer: Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com
+" Maintainer: Alex Burka <vim@alexburka.com>
" Credits: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
+" Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com
" Original author: Mario Eusebio
-" Last Change: Wed Jan 13 11:12:34 CET 2010
-" sinh added to matlab implicit commands
+" Last Change: Mon Jan 23 2017
+" added support for cell mode
" Change History:
+" - now highlights cell-mode separator comments
" - 'global' and 'persistent' keyword are now recognized
" quit when a syntax file was already loaded
@@ -60,6 +62,7 @@ syn match matlabComment "%.*$" contains=matlabTodo,matlabTab
" MT_ADDON - correctly highlights words after '...' as comments
syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab
syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab
+syn match matlabCellComment "^%%.*$"
syn keyword matlabOperator break zeros default margin round ones rand
syn keyword matlabOperator ceil floor size clear zeros eye mean std cov
@@ -96,6 +99,7 @@ hi def link matlabOO Statement
hi def link matlabSemicolon SpecialChar
hi def link matlabComment Comment
hi def link matlabMultilineComment Comment
+hi def link matlabCellComment Todo
hi def link matlabScope Type
hi def link matlabArithmeticOperator matlabOperator
diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim
index d6485080ee..4f70a0f334 100644
--- a/runtime/syntax/nasm.vim
+++ b/runtime/syntax/nasm.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: NASM - The Netwide Assembler (v0.98)
-" Maintainer: Andriy Sokolov <andriy145@gmail.com>
+" Maintainer: Andrii Sokolov <andriy145@gmail.com>
" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
-" Last Change: 2012 Feb 7
+" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting)
+" Last Change: 2017 Jan 23
" NASM Home: http://www.nasm.us/
@@ -67,8 +68,23 @@ syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)"
" Constants:
-syn match nasmStringError +["']+
+syn match nasmStringError +["'`]+
+" NASM is case sensitive here: eg. u-prefix allows for 4-digit, U-prefix for
+" 8-digit Unicode characters
+syn case match
+" one-char escape-sequences
+syn match nasmCStringEscape display contained "\\[’"‘\\\?abtnvfre]"
+" hex and octal numbers
+syn match nasmCStringEscape display contained "\\\(x\x\{2}\|\o\{1,3}\)"
+" Unicode characters
+syn match nasmCStringEscape display contained "\\\(u\x\{4}\|U\x\{8}\)"
+" ISO C99 format strings (copied from cFormat in runtime/syntax/c.vim)
+syn match nasmCStringFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
+syn match nasmCStringFormat display "%%" contained
syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+
+" Highlight C escape- and format-sequences within ``-strings
+syn match nasmCString +\(`[^`]\{-}`\)+ contains=nasmCStringEscape,nasmCStringFormat extend
+syn case ignore
syn match nasmBinNumber "\<[0-1]\+b\>"
syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1
syn match nasmOctNumber "\<\o\+q\>"
@@ -443,7 +459,10 @@ hi def link nasmInCommentTodo Todo
" Constant Group:
hi def link nasmString String
+hi def link nasmCString String
hi def link nasmStringError Error
+hi def link nasmCStringEscape SpecialChar
+hi def link nasmCStringFormat SpecialChar
hi def link nasmBinNumber Number
hi def link nasmOctNumber Number
hi def link nasmDecNumber Number
diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim
index efb355ec83..278fc1358c 100644
--- a/runtime/syntax/php.vim
+++ b/runtime/syntax/php.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5/7
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
-" Last Change: Jul 27, 2016
+" Last Change: Dec 11, 2016
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
@@ -495,7 +495,7 @@ syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,
" Highlighting for __autoload slightly different from line above
syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ __autoload
-highlight link phpSpecialFunction phpOperator
+hi def link phpSpecialFunction phpOperator
" Highlighting for PHP5's built-in classes
" - built-in classes harvested from get_declared_classes() in 5.1.4
@@ -518,14 +518,14 @@ syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStrin
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
-highlight link phpClasses phpFunctions
+hi def link phpClasses phpFunctions
" Highlighting for PHP5's built-in interfaces
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
-highlight link phpInterfaces phpConstant
+hi def link phpInterfaces phpConstant
" option defaults:
if ! exists('php_special_functions')
@@ -553,7 +553,7 @@ endif
if php_alt_assignByReference
" special highlighting for '=&' operator
syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
- highlight link phpAssignByRef Type
+ hi def link phpAssignByRef Type
endif
if php_alt_comparisons
@@ -565,7 +565,7 @@ if php_alt_comparisons
syntax case ignore
syntax keyword phpComparison instanceof contained containedin=phpRegion
- hi link phpComparison Statement
+ hi def link phpComparison Statement
endif
" ================================================================
@@ -645,21 +645,21 @@ hi def link phpTodo Todo
hi def link phpDocTodo Todo
hi def link phpMemberSelector Structure
if exists("php_oldStyle")
-hi phpIntVar guifg=Red ctermfg=DarkRed
-hi phpEnvVar guifg=Red ctermfg=DarkRed
-hi phpOperator guifg=SeaGreen ctermfg=DarkGreen
-hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
-hi phpRelation guifg=SeaGreen ctermfg=DarkGreen
-hi phpIdentifier guifg=DarkGray ctermfg=Brown
-hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
+ hi def phpIntVar guifg=Red ctermfg=DarkRed
+ hi def phpEnvVar guifg=Red ctermfg=DarkRed
+ hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
+ hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
+ hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
+ hi def phpIdentifier guifg=DarkGray ctermfg=Brown
+ hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
else
-hi def link phpIntVar Identifier
-hi def link phpEnvVar Identifier
-hi def link phpOperator Operator
-hi def link phpVarSelector Operator
-hi def link phpRelation Operator
-hi def link phpIdentifier Identifier
-hi def link phpIdentifierSimply Identifier
+ hi def link phpIntVar Identifier
+ hi def link phpEnvVar Identifier
+ hi def link phpOperator Operator
+ hi def link phpVarSelector Operator
+ hi def link phpRelation Operator
+ hi def link phpIdentifier Identifier
+ hi def link phpIdentifierSimply Identifier
endif
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 2f880bbc12..f97299cdeb 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Sep 22, 2016
-" Version: 165
+" Last Change: Jan 30, 2017
+" Version: 168
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@@ -305,7 +305,7 @@ if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
syn cluster shCaseList add=bashAdminStatement,bashStatement
syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
- syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
+ syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
syn keyword bashStatement command compgen
endif
@@ -346,7 +346,7 @@ syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
-syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
+syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNxt contained "\\[\\"'`$()#]"
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
@@ -376,8 +376,8 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
-ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
-ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
+ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
@@ -386,7 +386,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
" Here Strings: {{{1
" =============
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
-if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
+if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("b:is_posix"))
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
endif
@@ -407,7 +407,7 @@ else
endif
" Functions: {{{1
-if !exists("g:is_posix")
+if !exists("b:is_posix")
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo
endif
@@ -533,7 +533,7 @@ endif
" ====================
if exists("b:is_kornshell") || exists("b:is_bash")
syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence
- if exists("g:is_posix")
+ if exists("b:is_posix")
syn keyword shStatement command
else
syn keyword shStatement time
@@ -542,7 +542,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
" Useful bash Keywords: {{{1
" =====================
if exists("b:is_bash")
- syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source
+ syn keyword shStatement bind builtin dirs disown enable help logout popd pushd shopt source
else
syn keyword shStatement login newgrp
endif
diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim
index 8401923e02..755d08e768 100644
--- a/runtime/syntax/sshconfig.vim
+++ b/runtime/syntax/sshconfig.vim
@@ -5,8 +5,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
-" Last Change: 2016 Aug 11
-" SSH Version: 7.3p1
+" Last Change: 2016 Dec 28
+" SSH Version: 7.4p1
"
" Setup
@@ -181,6 +181,7 @@ syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword IdentitiesOnly
syn keyword sshconfigKeyword IdentityFile
syn keyword sshconfigKeyword IgnoreUnknown
+syn keyword sshconfigKeyword Include
syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword KbdInteractiveAuthentication
syn keyword sshconfigKeyword KbdInteractiveDevices
diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim
index 1556258b25..c3abfff632 100644
--- a/runtime/syntax/sshdconfig.vim
+++ b/runtime/syntax/sshdconfig.vim
@@ -6,8 +6,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
-" Last Change: 2016 Mar 1
-" SSH Version: 7.2
+" Last Change: 2016 Dec 28
+" SSH Version: 7.4p1
"
" Setup
@@ -161,6 +161,7 @@ syn keyword sshdconfigKeyword Compression
syn keyword sshdconfigKeyword DebianBanner
syn keyword sshdconfigKeyword DenyGroups
syn keyword sshdconfigKeyword DenyUsers
+syn keyword sshdconfigKeyword DisableForwarding
syn keyword sshdconfigKeyword ForceCommand
syn keyword sshdconfigKeyword GSSAPIAuthentication
syn keyword sshdconfigKeyword GSSAPICleanupCredentials
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index dd6690200f..ab19da329b 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: Sep 20, 2016
-" Version: 101
+" Last Change: Jan 31, 2017
+" Version: 103
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -494,13 +494,11 @@ if !exists("g:tex_no_math")
\ ['\\backslash' , '\'] ,
\ ['\\downarrow' , '↓'] ,
\ ['\\Downarrow' , '⇓'] ,
- \ ['\\langle' , '<'] ,
\ ['\\lbrace' , '['] ,
\ ['\\lceil' , '⌈'] ,
\ ['\\lfloor' , '⌊'] ,
\ ['\\lgroup' , '⌊'] ,
\ ['\\lmoustache' , '⎛'] ,
- \ ['\\rangle' , '>'] ,
\ ['\\rbrace' , ']'] ,
\ ['\\rceil' , '⌉'] ,
\ ['\\rfloor' , '⌋'] ,
@@ -510,6 +508,15 @@ if !exists("g:tex_no_math")
\ ['\\Uparrow' , '↑'] ,
\ ['\\updownarrow', '↕'] ,
\ ['\\Updownarrow', '⇕']]
+ if &ambw == "double" || exists("g:tex_usedblwidth")
+ let s:texMathDelimList= s:texMathDelimList + [
+ \ ['\\langle' , '〈'] ,
+ \ ['\\rangle' , '〉']]
+ else
+ let s:texMathDelimList= s:texMathDelimList + [
+ \ ['\\langle' , '<'] ,
+ \ ['\\rangle' , '>']]
+ endif
syn match texMathDelim '\\[bB]igg\=[lr]' contained nextgroup=texMathDelimBad
for texmath in s:texMathDelimList
exe "syn match texMathDelim '\\\\[bB]igg\\=[lr]\\=".texmath[0]."' contained conceal cchar=".texmath[1]
@@ -587,8 +594,6 @@ endif
if s:tex_fast =~# 'v'
if exists("g:tex_verbspell") && g:tex_verbspell
syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
- " listings package:
- syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell
if b:tex_stylish
syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell
else
@@ -680,6 +685,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['backslash' , '∖'],
\ ['barwedge' , '⊼'],
\ ['because' , '∵'],
+ \ ['beth' , 'ܒ'],
\ ['between' , '≬'],
\ ['bigcap' , '∩'],
\ ['bigcirc' , '○'],
@@ -699,6 +705,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['boxminus' , '⊟'],
\ ['boxplus' , '⊞'],
\ ['boxtimes' , '⊠'],
+ \ ['Box' , '☐'],
\ ['bullet' , '•'],
\ ['bumpeq' , '≏'],
\ ['Bumpeq' , '≎'],
@@ -748,6 +755,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['eqslantgtr' , '⪖'],
\ ['eqslantless' , '⪕'],
\ ['equiv' , '≡'],
+ \ ['eth' , 'ð'],
\ ['exists' , '∃'],
\ ['fallingdotseq' , '≒'],
\ ['flat' , '♭'],
@@ -757,6 +765,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['geq' , '≥'],
\ ['geqq' , '≧'],
\ ['gets' , '←'],
+ \ ['gimel' , 'ℷ'],
\ ['gg' , '⟫'],
\ ['gneqq' , '≩'],
\ ['gtrdot' , '⋗'],
@@ -767,13 +776,17 @@ if has("conceal") && &enc == 'utf-8'
\ ['heartsuit' , '♡'],
\ ['hookleftarrow' , '↩'],
\ ['hookrightarrow' , '↪'],
+ \ ['iff' , '⇔'],
\ ['iiint' , '∭'],
\ ['iint' , '∬'],
\ ['Im' , 'ℑ'],
\ ['imath' , 'ɩ'],
+ \ ['implies' , '⇒'],
\ ['in' , '∈'],
\ ['infty' , '∞'],
\ ['int' , '∫'],
+ \ ['jmath' , '𝚥'],
+ \ ['land' , '∧'],
\ ['lceil' , '⌈'],
\ ['ldots' , '…'],
\ ['le' , '≤'],
@@ -800,6 +813,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['ll' , '≪'],
\ ['lmoustache' , '╭'],
\ ['lneqq' , '≨'],
+ \ ['lor' , '∨'],
\ ['ltimes' , '⋉'],
\ ['mapsto' , '↦'],
\ ['measuredangle' , '∡'],
@@ -826,6 +840,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['nless' , '≮'],
\ ['nmid' , '∤'],
\ ['notin' , '∉'],
+ \ ['nparallel' , '∦'],
\ ['nprec' , '⊀'],
\ ['nrightarrow' , '↛'],
\ ['nRightarrow' , '⇏'],
@@ -927,10 +942,12 @@ if has("conceal") && &enc == 'utf-8'
\ ['trianglerighteq', '⊵'],
\ ['twoheadleftarrow', '↞'],
\ ['twoheadrightarrow', '↠'],
+ \ ['ulcorner' , '⌜'],
\ ['uparrow' , '↑'],
\ ['Uparrow' , '⇑'],
\ ['updownarrow' , '↕'],
\ ['Updownarrow' , '⇕'],
+ \ ['urcorner' , '⌝'],
\ ['varnothing' , '∅'],
\ ['vartriangle' , '∆'],
\ ['vdash' , '⊢'],
@@ -946,6 +963,15 @@ if has("conceal") && &enc == 'utf-8'
" \ ['jmath' , 'X']
" \ ['uminus' , 'X']
" \ ['uplus' , 'X']
+ if &ambw == "double" || exists("g:tex_usedblwidth")
+ let s:texMathList= s:texMathList + [
+ \ ['right\\rangle' , '〉'],
+ \ ['left\\langle' , '〈']]
+ else
+ let s:texMathList= s:texMathList + [
+ \ ['right\\rangle' , '>'],
+ \ ['left\\langle' , '<']]
+ endif
for texmath in s:texMathList
if texmath[0] =~# '\w$'
exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 49002b9599..85ced1ed3e 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -133,6 +133,7 @@ endif
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "\<0[xX]\x\+"
+syn match vimNumber "\<0[bB][01]\+"
syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
@@ -194,7 +195,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
-syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand,nvimUnmap,nvimMap
+syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim
index 2021c3a967..0667ca28ad 100644
--- a/runtime/syntax/xpm.vim
+++ b/runtime/syntax/xpm.vim
@@ -1,8 +1,9 @@
" Vim syntax file
" Language: X Pixmap
" Maintainer: Ronald Schild <rs@scutum.de>
-" Last Change: 2008 May 28
+" Last Change: 2017 Feb 01
" Version: 5.4n.1
+" Jemma Nelson added termguicolors support
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -15,7 +16,7 @@ syn keyword xpmTodo TODO FIXME XXX contained
syn region xpmComment start="/\*" end="\*/" contains=xpmTodo
syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmColors
-if has("gui_running")
+if has("gui_running") || has("termguicolors") && &termguicolors
let color = ""
let chars = ""
@@ -120,7 +121,7 @@ endwhile
unlet color chars colors cpp n i s
-endif " has("gui_running")
+endif " has("gui_running") || has("termguicolors") && &termguicolors
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim
index 1d0eb572fd..dfa6945a31 100644
--- a/runtime/syntax/xpm2.vim
+++ b/runtime/syntax/xpm2.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: X Pixmap v2
" Maintainer: Steve Wall (hitched97@velnet.com)
-" Last Change: 2012 Jun 01
+" Last Change: 2017 Feb 01
" (Dominique Pelle added @Spell)
" Version: 5.8
+" Jemma Nelson added termguicolors support
"
" Made from xpm.vim by Ronald Schild <rs@scutum.de>
@@ -22,7 +23,7 @@ syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo
command -nargs=+ Hi hi def <args>
-if has("gui_running")
+if has("gui_running") || has("termguicolors") && &termguicolors
let color = ""
let chars = ""
@@ -132,7 +133,7 @@ if has("gui_running")
unlet color chars colors cpp n i s
-endif " has("gui_running")
+endif " has("gui_running") || has("termguicolors") && &termguicolors
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 3e062aecc0..4063277403 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -4659,7 +4659,7 @@ int vim_rename(const char_u *from, const char_u *to)
return -1;
}
- // Avoid xmalloc() here as vim_rename() is called by buf_write() when neovim
+ // Avoid xmalloc() here as vim_rename() is called by buf_write() when nvim
// is `preserve_exit()`ing.
buffer = try_malloc(BUFSIZE);
if (buffer == NULL) {