0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

Update runtime files.

This commit is contained in:
Bram Moolenaar 2020-02-04 22:53:05 +01:00
parent 80147dda4f
commit 560979ed4f
16 changed files with 177 additions and 61 deletions

View File

@ -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 VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -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 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* *event-variable*
v:event Dictionary containing information about the current 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 finishes, please refer to |dict-identity| for how to get an
independent copy of it. independent copy of it.
@ -3455,6 +3457,7 @@ chdir({dir}) *chdir()*
directory (|:tcd|) then changes the tabpage local directory (|:tcd|) then changes the tabpage local
directory. directory.
- Otherwise, changes the global directory. - Otherwise, changes the global directory.
{dir} must be a String.
If successful, returns the previous working directory. Pass If successful, returns the previous working directory. Pass
this to another chdir() to restore the directory. this to another chdir() to restore the directory.
On failure, returns an empty string. On failure, returns an empty string.
@ -5664,7 +5667,7 @@ getwininfo([{winid}]) *getwininfo()*
GetWinnr()->getwininfo() GetWinnr()->getwininfo()
getwinpos([{timeout}]) *getwinpos()* 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: |getwinposx()| and |getwinposy()| combined:
[x-pos, y-pos] [x-pos, y-pos]
{timeout} can be used to specify how long to wait in msec for {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()*
winnr([{arg}]) The result is a Number, which is the number of the current winnr([{arg}]) The result is a Number, which is the number of the current
window. The top window has number 1. window. The top window has number 1.
Returns zero for a popup window.
The optional argument {arg} supports the following values: The optional argument {arg} supports the following values:
$ the number of the last window (the window $ the number of the last window (the window

View File

@ -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 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. 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: > For example, the function can contain this: >
let matches = ... list of words ... let matches = ... list of words ...

View File

@ -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 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| Window position and size |popup-position|
Closing the popup window |popup-close| Closing the popup window |popup-close|
Popup buffer and window |popup-buffer| Popup buffer and window |popup-buffer|
Terminal in popup window |popup-terminal|
2. Functions |popup-functions| 2. Functions |popup-functions|
Details |popup-function-details| Details |popup-function-details|
3. Usage |popup-usage| 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. 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* 2. Functions *popup-functions*

View File

@ -2313,6 +2313,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:debug-name repeat.txt /*:debug-name* :debug-name repeat.txt /*:debug-name*
:debugg repeat.txt /*:debugg* :debugg repeat.txt /*:debugg*
:debuggreedy repeat.txt /*:debuggreedy* :debuggreedy repeat.txt /*:debuggreedy*
:def vim9.txt /*:def*
:del change.txt /*:del* :del change.txt /*:del*
:delc map.txt /*:delc* :delc map.txt /*:delc*
:delcommand map.txt /*:delcommand* :delcommand map.txt /*:delcommand*
@ -2384,6 +2385,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:emenu gui.txt /*:emenu* :emenu gui.txt /*:emenu*
:en eval.txt /*:en* :en eval.txt /*:en*
:end eval.txt /*:end* :end eval.txt /*:end*
:enddef vim9.txt /*:enddef*
:endf eval.txt /*:endf* :endf eval.txt /*:endf*
:endfo eval.txt /*:endfo* :endfo eval.txt /*:endfo*
:endfor eval.txt /*:endfor* :endfor eval.txt /*:endfor*
@ -2404,6 +2406,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:execute eval.txt /*:execute* :execute eval.txt /*:execute*
:exi editing.txt /*:exi* :exi editing.txt /*:exi*
:exit editing.txt /*:exit* :exit editing.txt /*:exit*
:exp vim9.txt /*:exp*
:export vim9.txt /*:export*
:exu helphelp.txt /*:exu* :exu helphelp.txt /*:exu*
:exusage helphelp.txt /*:exusage* :exusage helphelp.txt /*:exusage*
:f editing.txt /*:f* :f editing.txt /*:f*
@ -2506,6 +2510,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:imapclear map.txt /*:imapclear* :imapclear map.txt /*:imapclear*
:ime gui.txt /*:ime* :ime gui.txt /*:ime*
:imenu gui.txt /*:imenu* :imenu gui.txt /*:imenu*
:imp vim9.txt /*:imp*
:import vim9.txt /*:import*
:import-cycle vim9.txt /*:import-cycle*
:in insert.txt /*:in* :in insert.txt /*:in*
:index index.txt /*:index* :index index.txt /*:index*
:ino map.txt /*:ino* :ino map.txt /*:ino*
@ -3354,6 +3361,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:vie editing.txt /*:vie* :vie editing.txt /*:vie*
:view editing.txt /*:view* :view editing.txt /*:view*
:vim quickfix.txt /*:vim* :vim quickfix.txt /*:vim*
:vim9 vim9.txt /*:vim9*
:vim9script vim9.txt /*:vim9script*
:vimgrep quickfix.txt /*:vimgrep* :vimgrep quickfix.txt /*:vimgrep*
:vimgrepa quickfix.txt /*:vimgrepa* :vimgrepa quickfix.txt /*:vimgrepa*
:vimgrepadd quickfix.txt /*:vimgrepadd* :vimgrepadd quickfix.txt /*:vimgrepadd*
@ -3834,6 +3843,7 @@ Command-line cmdline.txt /*Command-line*
Command-line-mode cmdline.txt /*Command-line-mode* Command-line-mode cmdline.txt /*Command-line-mode*
CompleteChanged autocmd.txt /*CompleteChanged* CompleteChanged autocmd.txt /*CompleteChanged*
CompleteDone autocmd.txt /*CompleteDone* CompleteDone autocmd.txt /*CompleteDone*
CompleteDonePre autocmd.txt /*CompleteDonePre*
ConPTY terminal.txt /*ConPTY* ConPTY terminal.txt /*ConPTY*
Contents quickref.txt /*Contents* Contents quickref.txt /*Contents*
Cscope if_cscop.txt /*Cscope* Cscope if_cscop.txt /*Cscope*
@ -4661,6 +4671,7 @@ E858 eval.txt /*E858*
E859 eval.txt /*E859* E859 eval.txt /*E859*
E86 windows.txt /*E86* E86 windows.txt /*E86*
E862 eval.txt /*E862* E862 eval.txt /*E862*
E863 popup.txt /*E863*
E864 pattern.txt /*E864* E864 pattern.txt /*E864*
E865 pattern.txt /*E865* E865 pattern.txt /*E865*
E866 pattern.txt /*E866* E866 pattern.txt /*E866*
@ -6276,6 +6287,7 @@ faq intro.txt /*faq*
farsi farsi.txt /*farsi* farsi farsi.txt /*farsi*
farsi.txt farsi.txt /*farsi.txt* farsi.txt farsi.txt /*farsi.txt*
fasm.vim syntax.txt /*fasm.vim* fasm.vim syntax.txt /*fasm.vim*
fast-functions vim9.txt /*fast-functions*
fcs_choice-variable eval.txt /*fcs_choice-variable* fcs_choice-variable eval.txt /*fcs_choice-variable*
fcs_reason-variable eval.txt /*fcs_reason-variable* fcs_reason-variable eval.txt /*fcs_reason-variable*
feature-list eval.txt /*feature-list* 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-position popup.txt /*popup-position*
popup-props popup.txt /*popup-props* popup-props popup.txt /*popup-props*
popup-scrollbar popup.txt /*popup-scrollbar* popup-scrollbar popup.txt /*popup-scrollbar*
popup-terminal popup.txt /*popup-terminal*
popup-textprop-pos popup.txt /*popup-textprop-pos* popup-textprop-pos popup.txt /*popup-textprop-pos*
popup-usage popup.txt /*popup-usage* popup-usage popup.txt /*popup-usage*
popup-window popup.txt /*popup-window* popup-window popup.txt /*popup-window*
@ -9544,6 +9557,7 @@ tutor usr_01.txt /*tutor*
twice if_cscop.txt /*twice* twice if_cscop.txt /*twice*
two-engines pattern.txt /*two-engines* two-engines pattern.txt /*two-engines*
type() eval.txt /*type()* type() eval.txt /*type()*
type-inference vim9.txt /*type-inference*
type-mistakes tips.txt /*type-mistakes* type-mistakes tips.txt /*type-mistakes*
typecorr-settings usr_41.txt /*typecorr-settings* typecorr-settings usr_41.txt /*typecorr-settings*
typecorr.txt usr_41.txt /*typecorr.txt* typecorr.txt usr_41.txt /*typecorr.txt*
@ -9907,6 +9921,14 @@ vim-variable eval.txt /*vim-variable*
vim.vim syntax.txt /*vim.vim* vim.vim syntax.txt /*vim.vim*
vim7 version7.txt /*vim7* vim7 version7.txt /*vim7*
vim8 version8.txt /*vim8* 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: options.txt /*vim:*
vim_announce intro.txt /*vim_announce* vim_announce intro.txt /*vim_announce*
vim_dev intro.txt /*vim_dev* vim_dev intro.txt /*vim_dev*

View File

@ -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 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 uses the output of |taglist()| to generate the result: a list of tags in the
inverse order of file names. inverse order of file names.
> >
function! TagFunc(pattern, flags, info) function TagFunc(pattern, flags, info)
function! CompareFilenames(item1, item2) function CompareFilenames(item1, item2)
let f1 = a:item1['filename'] let f1 = a:item1['filename']
let f2 = a:item2['filename'] let f2 = a:item2['filename']
return f1 >=# f2 ? return f1 >=# f2 ?

View File

@ -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 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 For an example see the Test_syntax_c() function in
src/testdir/test_syntax.vim. The main parts are: src/testdir/test_syntax.vim. The main parts are:
- Write a file you want to test with. This is useful for testing syntax - 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 - 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 characters. This makes sure the dump is always this size. The function
RunVimInTerminal() takes care of this. Pass it the arguments for the Vim RunVimInTerminal() takes care of this. Pass it the arguments for the Vim

View File

@ -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 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) 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: 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 - Use popup (or popup menu) for command line completion
- When using a popup for the info of a completion menu, and there is not - 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) 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 - Figure out the size and position better if wrapping inserts indent
Text properties: Text properties:
- Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
- Text properties spanning more than one line - Text properties spanning more than one line
- See remarks at top of src/textprop.c - See remarks at top of src/textprop.c
@ -121,9 +157,8 @@ Terminal emulator window:
conversions. conversions.
Error numbers available: Error numbers available:
E450, E451, E452, E451, E452, E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653, E654, E856, E857, E860, E861, E900
E654, E856, E857, E860, E861, E863, E889, E900
Patch to move duplicated code to a function. (Yegappan Lakshmanan, #5330) 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 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. Patch to add function to return the text used in the quickfix window.
(Yegappan, #5465) (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. Undo puts cursor in wrong line after "cG<Esc>" undo.
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019 :unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19) Dec 19)
Sound: support on Mac? Or does libcanberra work there?
Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019 Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
May 20) May 20)
Also put :argadd commands at the start for all buffers, so that their order 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. Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126 Koichi Iwamoto, #2126
Sound: support on Mac? Or does libcanberra work there?
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509) Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
The :syntax cchar value can only be a single character. It would be useful to 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 Now on github: #1856. Updated Oct 2017
Got permission to include this under the Vim license. 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) Add "t" action to settagstack(): truncate and add new entries. (#5405)
Result of synID() sometimes wrong in help files. (#5252) 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. Add a WindowScrolled event. Trigger around the same time as CursorMoved.
Can be used to update highlighting. #3127 #5181 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) Incorrect formatting with autoindent. (Sebastian Gniazdowski, #4909)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12) 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) directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
Also see #1689. 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 When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
highlighted. (van-de-bugger, 2018 Jan 23, #2576) highlighted. (van-de-bugger, 2018 Jan 23, #2576)

View File

@ -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 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 |systemlist()| get the result of a shell command as a list
|test_alloc_fail()| make memory allocation fail |test_alloc_fail()| make memory allocation fail
|test_autochdir()| test 'autochdir' functionality |test_autochdir()| test 'autochdir' functionality
test_disable_char_avail() test without typeahead (removed later)
|test_garbagecollect_now()| free memory right now |test_garbagecollect_now()| free memory right now
|test_null_channel()| return a null Channel |test_null_channel()| return a null Channel
|test_null_dict()| return a null Dict |test_null_dict()| return a null Dict

View File

@ -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 VIM REFERENCE MANUAL by Bram Moolenaar
@ -113,7 +113,7 @@ used: >
} }
echo temp " Error! 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 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. 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`: > Functions can be called without `:call`: >
writefile(lines, 'file') 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 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: > 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. |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 ~ 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. The second and third form are optional arguments.
When the caller omits an argument the {value} is used. 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`. [!] is used as with `:function`.
*:enddef* *:enddef*
@ -325,7 +334,7 @@ items, can then be imported in another script.
Namespace ~ Namespace ~
*:vim9script* *:vim9* *: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 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 script in its own namespace, instead of the global namespace. If a file
starts with: > 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: > To import multiple items at the same time: >
import {someValue, MyClass} from "thatscript.vim" 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 MyClass as ThatClass from "myclass.vim"
import {someValue, 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 ~ Import in an autoload script ~
For optimal startup speed, loading scripts should be postponed until they are 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 1. In the plugin define user commands, functions and/or mappings that refer to
an autoload script. > an autoload script. >
@ -445,7 +454,7 @@ script-local "s:" namespace will be used, even when "s:" is not specified.
The :def command ~ The :def command ~
Plugin writers have asked for a much faster Vim script. Investigation have 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 impossible, because of the overhead involved with calling a function, setting
up the local function scope and executing lines. There are many details that 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 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 Script writers have complained that the Vim script syntax is unexpectedly
different from what they are used to. To reduce this complaint popular 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 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 Since Vim already uses `:let` and `:const` and optional type checking is
desirable, the JavaScript/TypeScript syntax fits best for variable desirable, the JavaScript/TypeScript syntax fits best for variable

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " 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 " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@ -15,12 +15,16 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo-=C 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, " Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o". " and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql 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. " Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu') if exists('&ofu')
setlocal ofu=ccomplete#Complete setlocal ofu=ccomplete#Complete

View File

@ -3,7 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com> " Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com> " Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org> " Johannes Zellner <johannes@zellner.org>
" Last Change: 2019-08-01 " Last Change: 2020-01-27
" Filenames: *.cs " Filenames: *.cs
" License: Vim (see :h license) " License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs " 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 syn include @csXml syntax/xml.vim
hi def link xmlRegion Comment 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 " [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 syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers " Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.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 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization " Standard syntax initialization
@ -24,7 +24,7 @@ let s:supported = [
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', \ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy', \ 'sid', 'rc-buggy',
\ \
\ 'trusty', 'xenial', 'bionic', 'disco', 'eoan', 'focal', 'devel' \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'devel'
\ ] \ ]
let s:unsupported = [ let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@ -33,7 +33,8 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', \ '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 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 debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"' exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"'
exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[: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 debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"

View File

@ -2,7 +2,7 @@
" Language: Debian sources.list " Language: Debian sources.list
" Maintainer: Debian Vim Maintainers " Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> " 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 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization " Standard syntax initialization
@ -26,7 +26,7 @@ let s:supported = [
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', \ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy', \ 'sid', 'rc-buggy',
\ \
\ 'trusty', 'xenial', 'bionic', 'disco', 'eoan', 'focal', 'devel' \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'devel'
\ ] \ ]
let s:unsupported = [ let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@ -35,7 +35,8 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', \ '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 let &cpo=s:cpo

View File

@ -1,26 +1,45 @@
" dockerfile.vim - Syntax highlighting for Dockerfiles " dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer: Honza Pokorny <https://honza.ca> " Maintainer: Honza Pokorny <https://honza.ca>
" Version: 0.6 " Last Change: 2020 Jan 27
" Last Change: 2019 Aug 16
" License: BSD " License: BSD
" https://docs.docker.com/engine/reference/builder/
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
endif 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 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 dockerfileString String
hi def link dockerfileKeyword Keyword hi def link dockerfileKeyword Keyword
hi def link dockerfileComment Comment hi def link dockerfileComment Comment
hi def link dockerfileOption Special
let b:current_syntax = "dockerfile"

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 101 " Version: 102
" Last Change: 2019 Nov. 26 " Last Change: 2019 Dec. 14
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim " Usage: For instructions, do :help fortran-syntax from Vim
" Credits: " Credits:
@ -185,8 +185,8 @@ syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1
if exists("fortran_more_precise") if exists("fortran_more_precise")
" Numbers as targets " Numbers as targets
syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>" syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>"
syn match fortranTarget display "\(\<do\s\+\)\@<11=\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 "\(\<go\s*to\s*(\=\)\@11<=\(\d\+\s*,\s*\)*\d\+\>"
endif endif
syn keyword fortranTypeR external syn keyword fortranTypeR external
@ -274,7 +274,7 @@ syn match fortranType "\<elemental\>"
syn match fortranType "\<pure\>" syn match fortranType "\<pure\>"
syn match fortranType "\<impure\>" syn match fortranType "\<impure\>"
if exists("fortran_more_precise") 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 endif
if b:fortran_dialect == "f08" if b:fortran_dialect == "f08"