summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-04 22:53:05 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-04 22:53:05 +0100
commit560979ed4f0216f902a2c247e937f00a27dcb198 (patch)
tree777c300b97dc91f20ac21decb06a48bd18102cc9 /runtime
parent80147dda4f5a25c9533bc88583c87dbbb0a0f1f1 (diff)
downloadvim-git-560979ed4f0216f902a2c247e937f00a27dcb198.tar.gz
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/eval.txt10
-rw-r--r--runtime/doc/insert.txt5
-rw-r--r--runtime/doc/popup.txt19
-rw-r--r--runtime/doc/tags22
-rw-r--r--runtime/doc/tagsrch.txt6
-rw-r--r--runtime/doc/terminal.txt4
-rw-r--r--runtime/doc/todo.txt67
-rw-r--r--runtime/doc/version8.txt3
-rw-r--r--runtime/doc/vim9.txt29
-rw-r--r--runtime/ftplugin/c.vim8
-rw-r--r--runtime/syntax/cs.vim4
-rw-r--r--runtime/syntax/debchangelog.vim9
-rw-r--r--runtime/syntax/debsources.vim7
-rw-r--r--runtime/syntax/dockerfile.vim33
-rw-r--r--runtime/syntax/fortran.vim10
16 files changed, 177 insertions, 61 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 0dc2fffea..4d24ed79f 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 8.2. Last change: 2020 Jan 17
+*autocmd.txt* For Vim version 8.2. Last change: 2020 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 071f25080..1d282d286 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Jan 19
+*eval.txt* For Vim version 8.2. Last change: 2020 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1808,7 +1808,9 @@ v:errors Errors found by assert functions, such as |assert_true()|.
*v:event* *event-variable*
v:event Dictionary containing information about the current
- |autocommand|. The dictionary is emptied when the |autocommand|
+ |autocommand|. See the specific event for what it puts in
+ this dictionary.
+ The dictionary is emptied when the |autocommand|
finishes, please refer to |dict-identity| for how to get an
independent copy of it.
@@ -3455,6 +3457,7 @@ chdir({dir}) *chdir()*
directory (|:tcd|) then changes the tabpage local
directory.
- Otherwise, changes the global directory.
+ {dir} must be a String.
If successful, returns the previous working directory. Pass
this to another chdir() to restore the directory.
On failure, returns an empty string.
@@ -5664,7 +5667,7 @@ getwininfo([{winid}]) *getwininfo()*
GetWinnr()->getwininfo()
getwinpos([{timeout}]) *getwinpos()*
- The result is a list with two numbers, the result of
+ The result is a List with two numbers, the result of
|getwinposx()| and |getwinposy()| combined:
[x-pos, y-pos]
{timeout} can be used to specify how long to wait in msec for
@@ -10461,6 +10464,7 @@ winline() The result is a Number, which is the screen line of the cursor
*winnr()*
winnr([{arg}]) The result is a Number, which is the number of the current
window. The top window has number 1.
+ Returns zero for a popup window.
The optional argument {arg} supports the following values:
$ the number of the last window (the window
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 5dd29a13f..782223bce 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 8.2. Last change: 2020 Jan 04
+*insert.txt* For Vim version 8.2. Last change: 2020 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1079,7 +1079,8 @@ If you want to suppress the warning message for an empty result, return
Other items are ignored.
-For acting upon end of completion, see the |CompleteDone| autocommand event.
+For acting upon end of completion, see the |CompleteDonePre| and
+|CompleteDone| autocommand event.
For example, the function can contain this: >
let matches = ... list of words ...
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index ec1faf168..6372e4d80 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 8.2. Last change: 2019 Nov 30
+*popup.txt* For Vim version 8.2. Last change: 2020 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -11,6 +11,7 @@ Displaying text in a floating window. *popup* *popup-window* *popupwin*
Window position and size |popup-position|
Closing the popup window |popup-close|
Popup buffer and window |popup-buffer|
+ Terminal in popup window |popup-terminal|
2. Functions |popup-functions|
Details |popup-function-details|
3. Usage |popup-usage|
@@ -140,6 +141,22 @@ And options can be set on the buffer with `setbufvar()`, e.g.: >
You can also use `win_execute()` with a ":setlocal" command.
+TERMINAL IN POPUP WINDOW *popup-terminal*
+
+A special case is running a terminal in a popup window. Many rules are then
+different: *E863*
+- The popup window always has focus, it is not possible to switch to another
+ window.
+- When the job ends, the popup window closes.
+- The default Pmenu color is only used for the border and padding. To change
+ the color of the terminal itself set 'wincolor'.
+
+To run a terminal in a popup window, first create the terminal hidden. Then
+pass the buffer number to popup_create(). Example: >
+ let buf = term_start(['picker', 'Something'], #{hidden: 1, term_finish: 'close'})
+ let winid = popup_create(buf, #{minwidth: 50, minheight: 20})
+ set wincolor=Search
+
==============================================================================
2. Functions *popup-functions*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 97934d7d3..ed6dbef62 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2313,6 +2313,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:debug-name repeat.txt /*:debug-name*
:debugg repeat.txt /*:debugg*
:debuggreedy repeat.txt /*:debuggreedy*
+:def vim9.txt /*:def*
:del change.txt /*:del*
:delc map.txt /*:delc*
:delcommand map.txt /*:delcommand*
@@ -2384,6 +2385,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:emenu gui.txt /*:emenu*
:en eval.txt /*:en*
:end eval.txt /*:end*
+:enddef vim9.txt /*:enddef*
:endf eval.txt /*:endf*
:endfo eval.txt /*:endfo*
:endfor eval.txt /*:endfor*
@@ -2404,6 +2406,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:execute eval.txt /*:execute*
:exi editing.txt /*:exi*
:exit editing.txt /*:exit*
+:exp vim9.txt /*:exp*
+:export vim9.txt /*:export*
:exu helphelp.txt /*:exu*
:exusage helphelp.txt /*:exusage*
:f editing.txt /*:f*
@@ -2506,6 +2510,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:imapclear map.txt /*:imapclear*
:ime gui.txt /*:ime*
:imenu gui.txt /*:imenu*
+:imp vim9.txt /*:imp*
+:import vim9.txt /*:import*
+:import-cycle vim9.txt /*:import-cycle*
:in insert.txt /*:in*
:index index.txt /*:index*
:ino map.txt /*:ino*
@@ -3354,6 +3361,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:vie editing.txt /*:vie*
:view editing.txt /*:view*
:vim quickfix.txt /*:vim*
+:vim9 vim9.txt /*:vim9*
+:vim9script vim9.txt /*:vim9script*
:vimgrep quickfix.txt /*:vimgrep*
:vimgrepa quickfix.txt /*:vimgrepa*
:vimgrepadd quickfix.txt /*:vimgrepadd*
@@ -3834,6 +3843,7 @@ Command-line cmdline.txt /*Command-line*
Command-line-mode cmdline.txt /*Command-line-mode*
CompleteChanged autocmd.txt /*CompleteChanged*
CompleteDone autocmd.txt /*CompleteDone*
+CompleteDonePre autocmd.txt /*CompleteDonePre*
ConPTY terminal.txt /*ConPTY*
Contents quickref.txt /*Contents*
Cscope if_cscop.txt /*Cscope*
@@ -4661,6 +4671,7 @@ E858 eval.txt /*E858*
E859 eval.txt /*E859*
E86 windows.txt /*E86*
E862 eval.txt /*E862*
+E863 popup.txt /*E863*
E864 pattern.txt /*E864*
E865 pattern.txt /*E865*
E866 pattern.txt /*E866*
@@ -6276,6 +6287,7 @@ faq intro.txt /*faq*
farsi farsi.txt /*farsi*
farsi.txt farsi.txt /*farsi.txt*
fasm.vim syntax.txt /*fasm.vim*
+fast-functions vim9.txt /*fast-functions*
fcs_choice-variable eval.txt /*fcs_choice-variable*
fcs_reason-variable eval.txt /*fcs_reason-variable*
feature-list eval.txt /*feature-list*
@@ -8315,6 +8327,7 @@ popup-menu-added version5.txt /*popup-menu-added*
popup-position popup.txt /*popup-position*
popup-props popup.txt /*popup-props*
popup-scrollbar popup.txt /*popup-scrollbar*
+popup-terminal popup.txt /*popup-terminal*
popup-textprop-pos popup.txt /*popup-textprop-pos*
popup-usage popup.txt /*popup-usage*
popup-window popup.txt /*popup-window*
@@ -9544,6 +9557,7 @@ tutor usr_01.txt /*tutor*
twice if_cscop.txt /*twice*
two-engines pattern.txt /*two-engines*
type() eval.txt /*type()*
+type-inference vim9.txt /*type-inference*
type-mistakes tips.txt /*type-mistakes*
typecorr-settings usr_41.txt /*typecorr-settings*
typecorr.txt usr_41.txt /*typecorr.txt*
@@ -9907,6 +9921,14 @@ vim-variable eval.txt /*vim-variable*
vim.vim syntax.txt /*vim.vim*
vim7 version7.txt /*vim7*
vim8 version8.txt /*vim8*
+vim9-differences vim9.txt /*vim9-differences*
+vim9-export vim9.txt /*vim9-export*
+vim9-import vim9.txt /*vim9-import*
+vim9-rationale vim9.txt /*vim9-rationale*
+vim9-script vim9.txt /*vim9-script*
+vim9-types vim9.txt /*vim9-types*
+vim9.txt vim9.txt /*vim9.txt*
+vim9script vim9.txt /*vim9script*
vim: options.txt /*vim:*
vim_announce intro.txt /*vim_announce*
vim_dev intro.txt /*vim_dev*
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index f57b9c529..ed406e8dc 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -1,4 +1,4 @@
-*tagsrch.txt* For Vim version 8.2. Last change: 2019 Dec 27
+*tagsrch.txt* For Vim version 8.2. Last change: 2020 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -903,8 +903,8 @@ The following is a hypothetical example of a function used for 'tagfunc'. It
uses the output of |taglist()| to generate the result: a list of tags in the
inverse order of file names.
>
- function! TagFunc(pattern, flags, info)
- function! CompareFilenames(item1, item2)
+ function TagFunc(pattern, flags, info)
+ function CompareFilenames(item1, item2)
let f1 = a:item1['filename']
let f2 = a:item2['filename']
return f1 >=# f2 ?
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index 3eb84a391..5c44cd182 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 8.2. Last change: 2020 Jan 04
+*terminal.txt* For Vim version 8.2. Last change: 2020 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1025,7 +1025,7 @@ Writing a screen dump test for Vim ~
For an example see the Test_syntax_c() function in
src/testdir/test_syntax.vim. The main parts are:
- Write a file you want to test with. This is useful for testing syntax
- highlighting. You can also start Vim with en empty buffer.
+ highlighting. You can also start Vim with an empty buffer.
- Run Vim in a terminal with a specific size. The default is 20 lines of 75
characters. This makes sure the dump is always this size. The function
RunVimInTerminal() takes care of this. Pass it the arguments for the Vim
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 9a51915a2..ad3ac42c0 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2020 Jan 23
+*todo.txt* For Vim version 8.2. Last change: 2020 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -40,10 +40,44 @@ browser use: https://github.com/vim/vim/issues/1234
Include ipv6 syntax changes? (DJ Lucas, #5360)
+Add win_type(), which "popup" and "cmdline" as values?
+
+Vim9 script:
+- test s:var += 'some'
+ test exported += 'some'
+- implement default values for optional arguments
+ Generate instructions at start of function, skip over if argument provided?
+- Disallow unlet for local/script/imported vars
+- :func inside vim9script must still use a:arg
+- Check that import in legacy script works and puts item in s:
+- Error in any command in "vim9script" aborts sourcing.
+- Find a way to test expressions in legacy and Vim9 script without duplication
+- Test each level of expressions properly, with type checking
+- Test the
+- Test try/catch and throw better, also nested.
+ Test return inside try/finally jumps to finally and then returns.
+- call autoload function.
+- Type checking arguments when calling :def function
+- can use func as reference:
+ def SomeFunc() ...
+ map(list, SomeFunc)
+- define function and create funcref in one step:
+ let ref = def(arg: type): rettype
+ Also extends lambda
+- Test: Function declared inside a :def function is local, disappears at the
+ end of the function. Unless g: is used, just like with variables.
+- Can we omit \ for line continuation inside (), {}, ?
+ Requires parsing while reading a function. Like fgetline in do_one_cmd()?
+- implement :type
+- implement class
+- implement interface
+- predefined class: Promise<T>
+- import statement for type declaration?
+- Make accessing varargs faster: arg[expr]
+ EVAL expr
+ LOADVARARG (varags idx)
+
Popup windows:
-- Make it possible to put a terminal window in a popup. Would always grab key
- input? Sort-of possible by creating a hidden terminal and opening a popup
- with that buffer: #4063.
- Use popup (or popup menu) for command line completion
- When using a popup for the info of a completion menu, and there is not
enough space, let the popup overlap with the menu. (#4544)
@@ -55,6 +89,8 @@ Popup windows:
- Figure out the size and position better if wrapping inserts indent
Text properties:
+- Combining text property with 'cursorline' does not always work (Billie
+ Cleek, #5533)
- Text properties spanning more than one line
- See remarks at top of src/textprop.c
@@ -121,9 +157,8 @@ Terminal emulator window:
conversions.
Error numbers available:
-E450, E451, E452,
-E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
-E654, E856, E857, E860, E861, E863, E889, E900
+E451, E452, E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
+E654, E856, E857, E860, E861, E900
Patch to move duplicated code to a function. (Yegappan Lakshmanan, #5330)
@@ -142,16 +177,20 @@ Needs better docs. Is there a better name?
undo result wrong: Masato Nishihata, #4798
+When 'lazyredraw' is set sometimes the title is not updated.
+(Jason Franklin, 2020 Feb 3) Looks like a race condition.
+
Patch to add function to return the text used in the quickfix window.
(Yegappan, #5465)
+Patch for Template string: #4491. New pull: #4634
+Implementation is too inefficient, avoid using lambda.
+
Undo puts cursor in wrong line after "cG<Esc>" undo.
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19)
-Sound: support on Mac? Or does libcanberra work there?
-
Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
May 20)
Also put :argadd commands at the start for all buffers, so that their order
@@ -194,6 +233,8 @@ Enable 'termbidi' if $VTE_VERSION >= 5703 ?
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
+Sound: support on Mac? Or does libcanberra work there?
+
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
The :syntax cchar value can only be a single character. It would be useful to
@@ -204,6 +245,8 @@ It can replace the BeOS code, which is likely not used anymore.
Now on github: #1856. Updated Oct 2017
Got permission to include this under the Vim license.
+"--cleanFOO" does not result in an error. (#5537)
+
Add "t" action to settagstack(): truncate and add new entries. (#5405)
Result of synID() sometimes wrong in help files. (#5252)
@@ -269,9 +312,6 @@ Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems.
Add a WindowScrolled event. Trigger around the same time as CursorMoved.
Can be used to update highlighting. #3127 #5181
-Patch for Template string: #4491. New pull: #4634
-Implementation is too inefficient, avoid using lambda.
-
Incorrect formatting with autoindent. (Sebastian Gniazdowski, #4909)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
@@ -812,9 +852,6 @@ option_save({list}) *option_save()*
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
Also see #1689.
-crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
-17, #2652)
-
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index 0e7c2b7f9..2946d6cf1 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -1,4 +1,4 @@
-*version8.txt* For Vim version 8.2. Last change: 2019 Dec 29
+*version8.txt* For Vim version 8.2. Last change: 2020 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -306,7 +306,6 @@ New and extended functions: ~
|systemlist()| get the result of a shell command as a list
|test_alloc_fail()| make memory allocation fail
|test_autochdir()| test 'autochdir' functionality
-test_disable_char_avail() test without typeahead (removed later)
|test_garbagecollect_now()| free memory right now
|test_null_channel()| return a null Channel
|test_null_dict()| return a null Dict
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index c6c674da8..dd2b1b218 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2019 Dec 06
+*vim9.txt* For Vim version 8.2. Last change: 2020 Jan 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,7 +113,7 @@ used: >
}
echo temp " Error!
-An existing variable cannot be assigend to with `:let`, since that implies a
+An existing variable cannot be assigned to with `:let`, since that implies a
declaration. An exception is global variables: these can be both used with
and without `:let`, because there is no rule about where they are declared.
@@ -128,7 +128,7 @@ Omitting :call and :eval ~
Functions can be called without `:call`: >
writefile(lines, 'file')
-Using `:call` is still posible, but this is discouraged.
+Using `:call` is still possible, but this is discouraged.
A method call without `eval` is possible, so long as the start is an
identifier or can't be an Ex command. It does not work for string constants: >
@@ -146,9 +146,14 @@ No curly braces expansion ~
|curly-braces-names| cannot be used.
-Comperators ~
+No :append, :change or :insert ~
-The 'ignorecase' option is not used for comperators that use strings.
+These commands are too quickly confused with local variable names.
+
+
+Comparators ~
+
+The 'ignorecase' option is not used for comparators that use strings.
White space ~
@@ -242,6 +247,10 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
The second and third form are optional arguments.
When the caller omits an argument the {value} is used.
+ NOTE: It is possible to nest `:def` inside another
+ `:def`, but it is not possible to nest `:def` inside
+ `:function`, for backwards compatibility.
+
[!] is used as with `:function`.
*:enddef*
@@ -325,7 +334,7 @@ items, can then be imported in another script.
Namespace ~
*:vim9script* *:vim9*
-To recognize an file that can be imported the `vim9script` statement must
+To recognize a file that can be imported the `vim9script` statement must
appear as the first statement in the file. It tells Vim to interpret the
script in its own namespace, instead of the global namespace. If a file
starts with: >
@@ -371,7 +380,7 @@ The exported items can be imported individually in another Vim9 script: >
To import multiple items at the same time: >
import {someValue, MyClass} from "thatscript.vim"
-In case the name is ambigiuous, another name can be specified: >
+In case the name is ambiguous, another name can be specified: >
import MyClass as ThatClass from "myclass.vim"
import {someValue, MyClass as ThatClass} from "myclass.vim"
@@ -404,7 +413,7 @@ result in undefined items.
Import in an autoload script ~
For optimal startup speed, loading scripts should be postponed until they are
-actually needed. A recommended mechamism:
+actually needed. A recommended mechanism:
1. In the plugin define user commands, functions and/or mappings that refer to
an autoload script. >
@@ -445,7 +454,7 @@ script-local "s:" namespace will be used, even when "s:" is not specified.
The :def command ~
Plugin writers have asked for a much faster Vim script. Investigation have
-shown that keeping the existing semantics of funtion calls make this close to
+shown that keeping the existing semantics of function calls make this close to
impossible, because of the overhead involved with calling a function, setting
up the local function scope and executing lines. There are many details that
need to be handled, such as error messages and exceptions. The need to create
@@ -483,7 +492,7 @@ JavaScript/TypeScript syntax and semantics ~
Script writers have complained that the Vim script syntax is unexpectedly
different from what they are used to. To reduce this complaint popular
languages will be used as an example. At the same time, we do not want to
-abondon the well-known parts of legacy Vim script.
+abandon the well-known parts of legacy Vim script.
Since Vim already uses `:let` and `:const` and optional type checking is
desirable, the JavaScript/TypeScript syntax fits best for variable
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 371a78cbc..70e54b303 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Sep 28
+" Last Change: 2020 Feb 01
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -15,12 +15,16 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
-let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif"
+let b:undo_ftplugin = "setl fo< com< ofu< cms< def< inc< | if has('vms') | setl isk< | endif"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
+" These options have the right value as default, but the user may have
+" overruled that.
+setlocal commentstring& define& include&
+
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
setlocal ofu=ccomplete#Complete
diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim
index eeb990215..335641637 100644
--- a/runtime/syntax/cs.vim
+++ b/runtime/syntax/cs.vim
@@ -3,7 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org>
-" Last Change: 2019-08-01
+" Last Change: 2020-01-27
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -97,6 +97,8 @@ syn match csXmlComment "///.*$" contains=csXmlCommentLeader,@csXml,@Spell keepen
syn include @csXml syntax/xml.vim
hi def link xmlRegion Comment
+" Since syntax/xml.vim contains `syn spell toplevel`, we need to set it back to `default` here.
+syn spell default
" [1] 9.5 Pre-processing directives
syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index eb82613fe..8d282da44 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2019 Oct 20
+" Last Change: 2020 Feb 02
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@@ -24,7 +24,7 @@ let s:supported = [
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'disco', 'eoan', 'focal', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -33,7 +33,8 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
- \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic'
+ \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
+ \ 'disco'
\ ]
let &cpo=s:cpo
@@ -43,7 +44,7 @@ exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"'
exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"'
-syn keyword debchangelogUnreleased contained UNRELEASED
+syn match debchangelogUnreleased contained / UNRELEASED/
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/debsources.vim b/runtime/syntax/debsources.vim
index 349b2ac54..e97d3274b 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2019 Oct 18
+" Last Change: 2020 Feb 02
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@@ -26,7 +26,7 @@ let s:supported = [
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'disco', 'eoan', 'focal', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -35,7 +35,8 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
- \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic'
+ \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
+ \ 'disco'
\ ]
let &cpo=s:cpo
diff --git a/runtime/syntax/dockerfile.vim b/runtime/syntax/dockerfile.vim
index 4cf50d999..da3a3fc9d 100644
--- a/runtime/syntax/dockerfile.vim
+++ b/runtime/syntax/dockerfile.vim
@@ -1,26 +1,45 @@
" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer: Honza Pokorny <https://honza.ca>
-" Version: 0.6
-" Last Change: 2019 Aug 16
+" Last Change: 2020 Jan 27
" License: BSD
+" https://docs.docker.com/engine/reference/builder/
if exists("b:current_syntax")
finish
endif
-let b:current_syntax = "dockerfile"
+syntax include @JSON syntax/json.vim
+unlet b:current_syntax
+
+syntax include @Shell syntax/sh.vim
+unlet b:current_syntax
syntax case ignore
+syntax match dockerfileLinePrefix /\v^\s*(ONBUILD\s+)?\ze\S/ contains=dockerfileKeyword nextgroup=dockerfileInstruction skipwhite
+syntax region dockerfileFrom matchgroup=dockerfileKeyword start=/\v^\s*(FROM)\ze(\s|$)/ skip=/\v\\\_./ end=/\v((^|\s)AS(\s|$)|$)/ contains=dockerfileOption
-syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s/
+syntax keyword dockerfileKeyword contained ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE HEALTHCHECK LABEL MAINTAINER ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR
+syntax match dockerfileOption contained /\v(^|\s)\zs--\S+/
-syntax match dockerfileKeyword /\v(AS)/
+syntax match dockerfileInstruction contained /\v(\S+)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileValue
+syntax match dockerfileInstruction contained /\v(ADD|COPY)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileJSON
+syntax match dockerfileInstruction contained /\v(HEALTHCHECK)(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileInstruction
+syntax match dockerfileInstruction contained /\v(CMD|ENTRYPOINT|RUN)/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileShell
+syntax match dockerfileInstruction contained /\v(CMD|ENTRYPOINT|RUN)\ze\s+\[/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON
+syntax match dockerfileInstruction contained /\v(SHELL|VOLUME)/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON
-syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
+syntax region dockerfileString contained start=/\v"/ skip=/\v\\./ end=/\v"/
+syntax region dockerfileJSON contained keepend start=/\v\[/ skip=/\v\\\_./ end=/\v$/ contains=@JSON
+syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=@Shell
+syntax region dockerfileValue contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=dockerfileString
-syntax match dockerfileComment "\v^\s*#.*$"
+syntax region dockerfileComment start=/\v^\s*#/ end=/\v$/
+set commentstring=#\ %s
hi def link dockerfileString String
hi def link dockerfileKeyword Keyword
hi def link dockerfileComment Comment
+hi def link dockerfileOption Special
+
+let b:current_syntax = "dockerfile"
diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index 562382367..019a0bf2a 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: 101
-" Last Change: 2019 Nov. 26
+" Version: 102
+" Last Change: 2019 Dec. 14
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@@ -185,8 +185,8 @@ syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1
if exists("fortran_more_precise")
" Numbers as targets
syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>"
- syn match fortranTarget display "\(\<do\s\+\)\@<11=\d\+\>"
- syn match fortranTarget display "\(\<go\s*to\s*(\=\)\@<11=\(\d\+\s*,\s*\)*\d\+\>"
+ syn match fortranTarget display "\(\<do\s\+\)\@11<=\d\+\>"
+ syn match fortranTarget display "\(\<go\s*to\s*(\=\)\@11<=\(\d\+\s*,\s*\)*\d\+\>"
endif
syn keyword fortranTypeR external
@@ -274,7 +274,7 @@ syn match fortranType "\<elemental\>"
syn match fortranType "\<pure\>"
syn match fortranType "\<impure\>"
if exists("fortran_more_precise")
- syn match fortranConstructName "\(\<end\s*forall\s\+\)\@<15=\a\w*\>"
+ syn match fortranConstructName "\(\<end\s*forall\s\+\)\@15<=\a\w*\>"
endif
if b:fortran_dialect == "f08"