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:
parent
2c5ed4e330
commit
2c7f8c574f
@ -1,4 +1,4 @@
|
|||||||
*change.txt* For Vim version 8.2. Last change: 2020 Feb 09
|
*change.txt* For Vim version 8.2. Last change: 2020 Apr 11
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -209,7 +209,7 @@ gR Enter Virtual Replace mode: Each character you type
|
|||||||
start insert (for {Visual} see |Visual-mode|).
|
start insert (for {Visual} see |Visual-mode|).
|
||||||
|
|
||||||
*v_r*
|
*v_r*
|
||||||
{Visual}["x]r{char} Replace all selected characters by {char}.
|
{Visual}r{char} Replace all selected characters by {char}.
|
||||||
|
|
||||||
*v_C*
|
*v_C*
|
||||||
{Visual}["x]C Delete the highlighted lines [into register x] and
|
{Visual}["x]C Delete the highlighted lines [into register x] and
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*develop.txt* For Vim version 8.2. Last change: 2019 Nov 22
|
*develop.txt* For Vim version 8.2. Last change: 2020 Apr 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -151,7 +151,8 @@ VIM IS... NOT *design-not*
|
|||||||
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
|
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
|
||||||
everything but the kitchen sink, but some people say that you can clean one
|
everything but the kitchen sink, but some people say that you can clean one
|
||||||
with it. ;-)"
|
with it. ;-)"
|
||||||
To use Vim with gdb see: http://www.agide.org and http://clewn.sf.net.
|
To use Vim with gdb see |terminal-debugger|. Other (older) tools can be
|
||||||
|
found at http://www.agide.org and http://clewn.sf.net.
|
||||||
- Vim is not a fancy GUI editor that tries to look nice at the cost of
|
- Vim is not a fancy GUI editor that tries to look nice at the cost of
|
||||||
being less consistent over all platforms. But functional GUI features are
|
being less consistent over all platforms. But functional GUI features are
|
||||||
welcomed.
|
welcomed.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 8.2. Last change: 2020 Apr 13
|
*eval.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1809,10 +1809,12 @@ v:errors Errors found by assert functions, such as |assert_true()|.
|
|||||||
v:event Dictionary containing information about the current
|
v:event Dictionary containing information about the current
|
||||||
|autocommand|. See the specific event for what it puts in
|
|autocommand|. See the specific event for what it puts in
|
||||||
this dictionary.
|
this dictionary.
|
||||||
The dictionary is emptied when the |autocommand|
|
The dictionary is emptied when the |autocommand| finishes,
|
||||||
finishes, please refer to |dict-identity| for how to get an
|
please refer to |dict-identity| for how to get an independent
|
||||||
independent copy of it.
|
copy of it. Use |deepcopy()| if you want to keep the
|
||||||
|
information after the event triggers. Example: >
|
||||||
|
au TextYankPost * let g:foo = deepcopy(v:event)
|
||||||
|
<
|
||||||
*v:exception* *exception-variable*
|
*v:exception* *exception-variable*
|
||||||
v:exception The value of the exception most recently caught and not
|
v:exception The value of the exception most recently caught and not
|
||||||
finished. See also |v:throwpoint| and |throw-variables|.
|
finished. See also |v:throwpoint| and |throw-variables|.
|
||||||
@ -2901,13 +2903,13 @@ win_execute({id}, {command} [, {silent}])
|
|||||||
String execute {command} in window {id}
|
String execute {command} in window {id}
|
||||||
win_findbuf({bufnr}) List find windows containing {bufnr}
|
win_findbuf({bufnr}) List find windows containing {bufnr}
|
||||||
win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
|
win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
|
||||||
|
win_gettype([{nr}]) String type of window {nr}
|
||||||
win_gotoid({expr}) Number go to window with ID {expr}
|
win_gotoid({expr}) Number go to window with ID {expr}
|
||||||
win_id2tabwin({expr}) List get tab and window nr from window ID
|
win_id2tabwin({expr}) List get tab and window nr from window ID
|
||||||
win_id2win({expr}) Number get window nr from window ID
|
win_id2win({expr}) Number get window nr from window ID
|
||||||
win_screenpos({nr}) List get screen position of window {nr}
|
win_screenpos({nr}) List get screen position of window {nr}
|
||||||
win_splitmove({nr}, {target} [, {options}])
|
win_splitmove({nr}, {target} [, {options}])
|
||||||
Number move window {nr} to split of {target}
|
Number move window {nr} to split of {target}
|
||||||
win_type([{nr}]) String type of window {nr}
|
|
||||||
winbufnr({nr}) Number buffer number of window {nr}
|
winbufnr({nr}) Number buffer number of window {nr}
|
||||||
wincol() Number window column of the cursor
|
wincol() Number window column of the cursor
|
||||||
winheight({nr}) Number height of window {nr}
|
winheight({nr}) Number height of window {nr}
|
||||||
@ -7766,7 +7768,7 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
|||||||
GetExpr()->range()
|
GetExpr()->range()
|
||||||
<
|
<
|
||||||
|
|
||||||
rand([{expr}]) *rand()*
|
rand([{expr}]) *rand()* *random*
|
||||||
Return a pseudo-random Number generated with an xoshiro128**
|
Return a pseudo-random Number generated with an xoshiro128**
|
||||||
algorithm using seed {expr}. The returned number is 32 bits,
|
algorithm using seed {expr}. The returned number is 32 bits,
|
||||||
also on 64 bits systems, for consistency.
|
also on 64 bits systems, for consistency.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*netbeans.txt* For Vim version 8.2. Last change: 2019 May 05
|
*netbeans.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*popup.txt* For Vim version 8.2. Last change: 2020 Mar 21
|
*popup.txt* For Vim version 8.2. Last change: 2020 Apr 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -535,6 +535,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()*
|
|||||||
wrap
|
wrap
|
||||||
zindex
|
zindex
|
||||||
The options from |popup_move()| can also be used.
|
The options from |popup_move()| can also be used.
|
||||||
|
Generally, setting an option to zero or an empty string resets
|
||||||
|
it to the default value, but there are exceptions.
|
||||||
For "hidden" use |popup_hide()| and |popup_show()|.
|
For "hidden" use |popup_hide()| and |popup_show()|.
|
||||||
"tabpage" cannot be changed.
|
"tabpage" cannot be changed.
|
||||||
|
|
||||||
@ -579,15 +581,15 @@ The second argument of |popup_create()| is a dictionary with options:
|
|||||||
line Screen line where to position the popup. Can use a
|
line Screen line where to position the popup. Can use a
|
||||||
number or "cursor", "cursor+1" or "cursor-1" to use
|
number or "cursor", "cursor+1" or "cursor-1" to use
|
||||||
the line of the cursor and add or subtract a number of
|
the line of the cursor and add or subtract a number of
|
||||||
lines. If omitted the popup is vertically centered.
|
lines. If omitted or zero the popup is vertically
|
||||||
The first line is 1.
|
centered. The first line is 1.
|
||||||
When using "textprop" the number is relative to the
|
When using "textprop" the number is relative to the
|
||||||
text property and can be negative.
|
text property and can be negative.
|
||||||
col Screen column where to position the popup. Can use a
|
col Screen column where to position the popup. Can use a
|
||||||
number or "cursor" to use the column of the cursor,
|
number or "cursor" to use the column of the cursor,
|
||||||
"cursor+9" or "cursor-9" to add or subtract a number
|
"cursor+9" or "cursor-9" to add or subtract a number
|
||||||
of columns. If omitted the popup is horizontally
|
of columns. If omitted or zero the popup is
|
||||||
centered. The first column is 1.
|
horizontally centered. The first column is 1.
|
||||||
When using "textprop" the number is relative to the
|
When using "textprop" the number is relative to the
|
||||||
text property and can be negative.
|
text property and can be negative.
|
||||||
pos "topleft", "topright", "botleft" or "botright":
|
pos "topleft", "topright", "botleft" or "botright":
|
||||||
|
@ -1315,6 +1315,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
|||||||
+iconv various.txt /*+iconv*
|
+iconv various.txt /*+iconv*
|
||||||
+iconv/dyn various.txt /*+iconv\/dyn*
|
+iconv/dyn various.txt /*+iconv\/dyn*
|
||||||
+insert_expand various.txt /*+insert_expand*
|
+insert_expand various.txt /*+insert_expand*
|
||||||
|
+ipv6 various.txt /*+ipv6*
|
||||||
+job various.txt /*+job*
|
+job various.txt /*+job*
|
||||||
+jumplist various.txt /*+jumplist*
|
+jumplist various.txt /*+jumplist*
|
||||||
+keymap various.txt /*+keymap*
|
+keymap various.txt /*+keymap*
|
||||||
@ -8579,6 +8580,7 @@ quote~ change.txt /*quote~*
|
|||||||
r change.txt /*r*
|
r change.txt /*r*
|
||||||
r.vim syntax.txt /*r.vim*
|
r.vim syntax.txt /*r.vim*
|
||||||
rand() eval.txt /*rand()*
|
rand() eval.txt /*rand()*
|
||||||
|
random eval.txt /*random*
|
||||||
range() eval.txt /*range()*
|
range() eval.txt /*range()*
|
||||||
raw-terminal-mode term.txt /*raw-terminal-mode*
|
raw-terminal-mode term.txt /*raw-terminal-mode*
|
||||||
rcp pi_netrw.txt /*rcp*
|
rcp pi_netrw.txt /*rcp*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 03
|
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -527,10 +527,13 @@ a tag for each "#defined" macro, typedefs, enums, etc.
|
|||||||
Some programs that generate tags files:
|
Some programs that generate tags files:
|
||||||
ctags As found on most Unix systems. Only supports C. Only
|
ctags As found on most Unix systems. Only supports C. Only
|
||||||
does the basic work.
|
does the basic work.
|
||||||
|
universal ctags A maintained version of ctags based on exuberant
|
||||||
|
ctags. See https://ctags.io.
|
||||||
*Exuberant_ctags*
|
*Exuberant_ctags*
|
||||||
exuberant ctags This is a very good one. It works for C, C++, Java,
|
exuberant ctags This is a very good one. It works for C, C++, Java,
|
||||||
Fortran, Eiffel and others. It can generate tags for
|
Fortran, Eiffel and others. It can generate tags for
|
||||||
many items. See http://ctags.sourceforge.net.
|
many items. See http://ctags.sourceforge.net.
|
||||||
|
No new version since 2009.
|
||||||
etags Connected to Emacs. Supports many languages.
|
etags Connected to Emacs. Supports many languages.
|
||||||
JTags For Java, in Java. It can be found at
|
JTags For Java, in Java. It can be found at
|
||||||
http://www.fleiner.com/jtags/.
|
http://www.fleiner.com/jtags/.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*term.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
*term.txt* For Vim version 8.2. Last change: 2020 Apr 12
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -545,6 +545,7 @@ Note about colors: The 't_Co' option tells Vim the number of colors available.
|
|||||||
When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
|
When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
|
||||||
If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
|
If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
|
||||||
to reset to the default colors. Also see 'termguicolors'.
|
to reset to the default colors. Also see 'termguicolors'.
|
||||||
|
When the GUI is running 't_Co' is set to 16777216.
|
||||||
|
|
||||||
*termcap-cursor-shape* *termcap-cursor-color*
|
*termcap-cursor-shape* *termcap-cursor-color*
|
||||||
When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
|
When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*todo.txt* For Vim version 8.2. Last change: 2020 Apr 10
|
*todo.txt* For Vim version 8.2. Last change: 2020 Apr 20
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -39,10 +39,10 @@ browser use: https://github.com/vim/vim/issues/1234
|
|||||||
-------------------- Known bugs and current work -----------------------
|
-------------------- Known bugs and current work -----------------------
|
||||||
|
|
||||||
Vim9 script:
|
Vim9 script:
|
||||||
|
more tests for # comments:
|
||||||
|
check all calls to ends_excmd() and test that space before # is needed.
|
||||||
|
next: ex_findpat()
|
||||||
func and partial types:
|
func and partial types:
|
||||||
- check using func type with default arguments and varargs.
|
|
||||||
func(type, type?, ...): rettype
|
|
||||||
- Type checking arguments when calling :def function and test
|
|
||||||
- Calling unknown user function does not give proper error message:
|
- Calling unknown user function does not give proper error message:
|
||||||
assert_equal('123text', RefDef2Arg()) typo for "RetDef2Arg"
|
assert_equal('123text', RefDef2Arg()) typo for "RetDef2Arg"
|
||||||
- "func" inside "vim9script" doesn't work? (Ben Jackson, #5670)
|
- "func" inside "vim9script" doesn't work? (Ben Jackson, #5670)
|
||||||
@ -51,15 +51,25 @@ func and partial types:
|
|||||||
let ref = def(arg: type): rettype
|
let ref = def(arg: type): rettype
|
||||||
body
|
body
|
||||||
enddef
|
enddef
|
||||||
|
- Test that a script-local function in Vim9 script cannot be deleted.
|
||||||
|
- Test that a function defined inside a :def function is local to that
|
||||||
|
function, g: functions can be defined and script-local functions cannot be
|
||||||
|
defined.
|
||||||
Also:
|
Also:
|
||||||
|
- When wildcards are expanded, find `=expr` and evaluate it before invoking
|
||||||
|
the command. For example: :edit `=filename`
|
||||||
- "echo Func()" is an error if Func() does not return anything.
|
- "echo Func()" is an error if Func() does not return anything.
|
||||||
|
- Check all Ex commands, give error if they use an expression and should be
|
||||||
|
compiled.
|
||||||
|
- For range: make table of first ASCII character with flag to quickly check if
|
||||||
|
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||||
- better implementation for partial and tests for that.
|
- better implementation for partial and tests for that.
|
||||||
- Make "g:imported = Export.exported" work in Vim9 script.
|
- Make "g:imported = Export.exported" work in Vim9 script.
|
||||||
- Make Foo.Bar() work to call the dict function. (#5676)
|
- Make Foo.Bar() work to call the dict function. (#5676)
|
||||||
- make "let var: string" work in a vim9script.
|
|
||||||
- Disallow unlet for local/script/imported vars
|
|
||||||
- Support type for ":let"/":const" at script level for Vim9 script.
|
- Support type for ":let"/":const" at script level for Vim9 script.
|
||||||
(Ben Jackson, #5671)
|
(Ben Jackson, #5671)
|
||||||
|
Can we share the code for :let between direct execution and compiling?
|
||||||
|
- Disallow unlet for local/script/imported vars
|
||||||
- Make "++nr" work.
|
- Make "++nr" work.
|
||||||
- Check that import in legacy script works and puts item in s:
|
- Check that import in legacy script works and puts item in s:
|
||||||
- Error in any command in "vim9script" aborts sourcing.
|
- Error in any command in "vim9script" aborts sourcing.
|
||||||
@ -75,8 +85,6 @@ Also:
|
|||||||
map(list, SomeFunc)
|
map(list, SomeFunc)
|
||||||
- Test: Function declared inside a :def function is local, disappears at the
|
- Test: Function declared inside a :def function is local, disappears at the
|
||||||
end of the function. Unless g: is used, just like with variables.
|
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 :type
|
||||||
- import type declaration?
|
- import type declaration?
|
||||||
- implement class
|
- implement class
|
||||||
@ -93,6 +101,7 @@ Popup windows:
|
|||||||
Is buf->nwindows incorrect?
|
Is buf->nwindows incorrect?
|
||||||
- popup_clear() and popup_close() should close the terminal popup, and
|
- popup_clear() and popup_close() should close the terminal popup, and
|
||||||
make the buffer hidden. #5745
|
make the buffer hidden. #5745
|
||||||
|
- Cursor not updated before a redraw, making it jump. (#5943)
|
||||||
- With terminal in popup, allow for popup_hide() to temporarily hide it.?
|
- With terminal in popup, allow for popup_hide() to temporarily hide it.?
|
||||||
- Fire some autocommand event after a new popup window was created and
|
- Fire some autocommand event after a new popup window was created and
|
||||||
positioned? PopupNew? Could be used to set some options or move it out of
|
positioned? PopupNew? Could be used to set some options or move it out of
|
||||||
@ -113,6 +122,8 @@ Popup windows:
|
|||||||
Text properties:
|
Text properties:
|
||||||
- Patch to fix that split / join does not update properties properly (Axel
|
- Patch to fix that split / join does not update properties properly (Axel
|
||||||
Forsman, #5839) Alternative: #5875.
|
Forsman, #5839) Alternative: #5875.
|
||||||
|
- :goto does not go to the right place when test properties are present.
|
||||||
|
(#5930)
|
||||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||||
- Get E685 with a sequence of commands. (#5674)
|
- Get E685 with a sequence of commands. (#5674)
|
||||||
- Combining text property with 'cursorline' does not always work (Billie
|
- Combining text property with 'cursorline' does not always work (Billie
|
||||||
@ -152,6 +163,10 @@ Terminal debugger:
|
|||||||
with another Vim instance.
|
with another Vim instance.
|
||||||
|
|
||||||
Terminal emulator window:
|
Terminal emulator window:
|
||||||
|
- When started with ":terminal ++close" and the shell exits but there is a
|
||||||
|
background process, the window remains open, because the channel still
|
||||||
|
exists (and output still shows). Perhaps close the window when an explicit
|
||||||
|
++close was used? (#5931)
|
||||||
- When the job in the terminal doesn't use mouse events, let the scroll wheel
|
- When the job in the terminal doesn't use mouse events, let the scroll wheel
|
||||||
scroll the scrollback, like a terminal does at the shell prompt. #2490
|
scroll the scrollback, like a terminal does at the shell prompt. #2490
|
||||||
And use modeless selection. #2962
|
And use modeless selection. #2962
|
||||||
@ -184,7 +199,7 @@ Terminal emulator window:
|
|||||||
|
|
||||||
Error numbers available:
|
Error numbers available:
|
||||||
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
|
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
|
||||||
E654, E856, E857, E861, E900
|
E856, E857, E861, E900
|
||||||
|
|
||||||
Buffer autocommands are a bit inconsistent. Add a separate set of
|
Buffer autocommands are a bit inconsistent. Add a separate set of
|
||||||
autocommands for the buffer lifecycle:
|
autocommands for the buffer lifecycle:
|
||||||
@ -198,7 +213,7 @@ The buffer list and windows are locked, no changes possible
|
|||||||
Patch to fix drawing error with DirectX. (James Grant, #5688)
|
Patch to fix drawing error with DirectX. (James Grant, #5688)
|
||||||
Causes flicker on resizing.
|
Causes flicker on resizing.
|
||||||
|
|
||||||
In gvim always set t_Co to 16777216 (#5903)
|
Patch to support ipv6 for channel. (Ozaki Kiichi, #5893)
|
||||||
|
|
||||||
Patch to explain use of "%" in :!. (David Briscoe, #5591)
|
Patch to explain use of "%" in :!. (David Briscoe, #5591)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*various.txt* For Vim version 8.2. Last change: 2020 Mar 19
|
*various.txt* For Vim version 8.2. Last change: 2020 Apr 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -543,7 +543,7 @@ N *+X11* Unix only: can restore window title |X11|
|
|||||||
locked or the variable type is changed, then further
|
locked or the variable type is changed, then further
|
||||||
command output messages will cause errors.
|
command output messages will cause errors.
|
||||||
To get the output of one command the |execute()|
|
To get the output of one command the |execute()|
|
||||||
function can be used.
|
function can be used instead of redirection.
|
||||||
|
|
||||||
:redi[r] =>> {var} Append messages to an existing variable. Only string
|
:redi[r] =>> {var} Append messages to an existing variable. Only string
|
||||||
variables can be used.
|
variables can be used.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 09
|
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -66,6 +66,10 @@ comment can also start with #. Normally this is a command to list text with
|
|||||||
numbers, but you can also use `:number` for that. >
|
numbers, but you can also use `:number` for that. >
|
||||||
let count = 0 # number of occurences of Ni!
|
let count = 0 # number of occurences of Ni!
|
||||||
|
|
||||||
|
To improve readability there must be a space between the command and the #
|
||||||
|
that starts a comment. Note that #{ is the start of a dictionary, therefore
|
||||||
|
it cannot start a comment.
|
||||||
|
|
||||||
|
|
||||||
Vim9 functions ~
|
Vim9 functions ~
|
||||||
|
|
||||||
@ -82,6 +86,29 @@ In the function body:
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
Functions are script-local by default ~
|
||||||
|
|
||||||
|
When using `:function` or `:def` to specify a new function at the script level
|
||||||
|
in a Vim9 script, the function is local to the script, as if "s:" was
|
||||||
|
prefixed. To define a global function the "g:" prefix must be used.
|
||||||
|
|
||||||
|
When using `:function` or `:def` to specify a new function inside a function,
|
||||||
|
the function is local to the function. It is not possible to define a
|
||||||
|
script-local function inside a function. To define a global function the "g:"
|
||||||
|
prefix must be used.
|
||||||
|
|
||||||
|
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
||||||
|
search for the function in this order:
|
||||||
|
- Local to the current function scope.
|
||||||
|
- Local to the current script file.
|
||||||
|
- Imported functions, see `:import`.
|
||||||
|
- Global.
|
||||||
|
|
||||||
|
Global functions can be defined and deleted at nearly any time. In Vim9
|
||||||
|
script script-local functions are defined once when the script is sourced and
|
||||||
|
cannot be deleted.
|
||||||
|
|
||||||
|
|
||||||
Variable declarations with :let and :const ~
|
Variable declarations with :let and :const ~
|
||||||
|
|
||||||
Local variables need to be declared with `:let`. Local constants need to be
|
Local variables need to be declared with `:let`. Local constants need to be
|
||||||
@ -468,9 +495,12 @@ Then "myvar" will only exist in this file. While without `vim9script` it would
|
|||||||
be available as `g:myvar` from any other script and function.
|
be available as `g:myvar` from any other script and function.
|
||||||
|
|
||||||
The variables at the file level are very much like the script-local "s:"
|
The variables at the file level are very much like the script-local "s:"
|
||||||
variables in legacy Vim script, but the "s:" is omitted.
|
variables in legacy Vim script, but the "s:" is omitted. And they cannot be
|
||||||
|
deleted.
|
||||||
|
|
||||||
In Vim9 script the global "g:" namespace can still be used as before.
|
In Vim9 script the global "g:" namespace can still be used as before. And the
|
||||||
|
"w:", "b:" and "t:" namespaces. These have in common that variables are not
|
||||||
|
declared and they can be deleted.
|
||||||
|
|
||||||
A side effect of `:vim9script` is that the 'cpoptions' option is set to the
|
A side effect of `:vim9script` is that the 'cpoptions' option is set to the
|
||||||
Vim default value, like with: >
|
Vim default value, like with: >
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2020 Apr 12
|
" Last Change: 2020 Apr 17
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
" Vim settings file
|
" Vim settings file
|
||||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||||
" Version: 0.50
|
" Version: 0.50
|
||||||
" Last Change: 2015 Nov. 30
|
" Last Change: 2020 Apr 20
|
||||||
|
" Patched By: Eisuke Kawashima
|
||||||
" 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-plugin from Vim
|
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||||
" Credits:
|
" Credits:
|
||||||
@ -31,10 +32,10 @@ if !exists("b:fortran_fixed_source")
|
|||||||
elseif exists("fortran_fixed_source")
|
elseif exists("fortran_fixed_source")
|
||||||
" User guarantees fixed source form
|
" User guarantees fixed source form
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
elseif expand("%:e") ==? "f\<90\|95\|03\|08\>"
|
elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$'
|
||||||
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
||||||
let b:fortran_fixed_source = 0
|
let b:fortran_fixed_source = 0
|
||||||
elseif expand("%:e") ==? "f\|f77\|for"
|
elseif expand("%:e") =~? '^\%(f\|f77\|for\)$'
|
||||||
" Fixed-form file extension defaults
|
" Fixed-form file extension defaults
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
else
|
else
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Perl
|
" Language: Perl
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl
|
" Homepage: https://github.com/vim-perl/vim-perl
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2015-02-09
|
" Last Change: 2020 Apr 15
|
||||||
|
|
||||||
if exists("b:did_ftplugin") | finish | endif
|
if exists("b:did_ftplugin") | finish | endif
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Perl 6
|
" Language: Perl 6
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl
|
" Homepage: https://github.com/vim-perl/vim-perl
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2013-07-21
|
" Last Change: 2020 Apr 15
|
||||||
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||||
"
|
"
|
||||||
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
|
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
|
||||||
|
@ -1,7 +1,41 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: systemd.unit(5)
|
" Language: systemd.unit(5)
|
||||||
|
" Keyword Lookup Support: Enno Nagel <enno.nagel+vim@gmail.com>
|
||||||
|
|
||||||
if !exists('b:did_ftplugin')
|
if !exists('b:did_ftplugin')
|
||||||
" Looks a lot like dosini files.
|
" Looks a lot like dosini files.
|
||||||
runtime! ftplugin/dosini.vim
|
runtime! ftplugin/dosini.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !has('unix')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !has('gui_running')
|
||||||
|
command! -buffer -nargs=1 Sman silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw!
|
||||||
|
elseif has('terminal')
|
||||||
|
command! -buffer -nargs=1 Sman silent exe 'term ' . KeywordLookup_systemd(<q-args>)
|
||||||
|
else
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('*KeywordLookup_systemd')
|
||||||
|
function KeywordLookup_systemd(keyword) abort
|
||||||
|
let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$')
|
||||||
|
if len(matches) > 1
|
||||||
|
let section = matches[1]
|
||||||
|
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd.' . section
|
||||||
|
else
|
||||||
|
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
setlocal keywordprg=:Sman
|
||||||
|
|
||||||
|
if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin)
|
||||||
|
let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<'
|
||||||
|
else
|
||||||
|
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword<'
|
||||||
|
endif
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||||
" Version: 47
|
" Version: 47
|
||||||
" Last Change: 2016 Oct. 29
|
" Last Change: 2020 Apr 20
|
||||||
|
" Patched By: Eisuke Kawashima
|
||||||
" 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-indent from Vim
|
" Usage: For instructions, do :help fortran-indent from Vim
|
||||||
" Credits:
|
" Credits:
|
||||||
@ -39,10 +40,10 @@ if !exists("b:fortran_fixed_source")
|
|||||||
elseif exists("fortran_fixed_source")
|
elseif exists("fortran_fixed_source")
|
||||||
" User guarantees fixed source form
|
" User guarantees fixed source form
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
elseif expand("%:e") ==? "f\<90\|95\|03\|08\>"
|
elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$'
|
||||||
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
||||||
let b:fortran_fixed_source = 0
|
let b:fortran_fixed_source = 0
|
||||||
elseif expand("%:e") ==? "f\|f77\|for"
|
elseif expand("%:e") =~? '^\%(f\|f77\|for\)$'
|
||||||
" Fixed-form file extension defaults
|
" Fixed-form file extension defaults
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
else
|
else
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Perl 5
|
" Language: Perl 5
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl
|
" Homepage: https://github.com/vim-perl/vim-perl
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2017-01-04
|
" Last Change: 2020 Apr 15
|
||||||
|
|
||||||
" Suggestions and improvements by :
|
" Suggestions and improvements by :
|
||||||
" Aaron J. Sherman (use syntax for hints)
|
" Aaron J. Sherman (use syntax for hints)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Perl 6
|
" Language: Perl 6
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl
|
" Homepage: https://github.com/vim-perl/vim-perl
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2017 Jun 13
|
" Last Change: 2020 Apr 15
|
||||||
" Contributors: Andy Lester <andy@petdance.com>
|
" Contributors: Andy Lester <andy@petdance.com>
|
||||||
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||||
"
|
"
|
||||||
|
@ -108,8 +108,9 @@ map ,o oPut 'X's in the left box, then hit 'C' or 'R'
|
|||||||
map ,R 03stop
|
map ,R 03stop
|
||||||
"
|
"
|
||||||
" Write a new line (used by 'I'nitialize board)
|
" Write a new line (used by 'I'nitialize board)
|
||||||
|
" In remembrance of John Conway, 26 December 1937 – 11 April 2020.
|
||||||
map )0 o- --....................--....................-
|
map )0 o- --....................--....................-
|
||||||
map )1 o- VIM --....................--....................-
|
map )1 o- JOHN CONWAY --....................--....................-
|
||||||
map )2 o- LIVES --....................--....................-
|
map )2 o- LIVES --....................--....................-
|
||||||
"
|
"
|
||||||
"
|
"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
" 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: 102
|
" Version: 102
|
||||||
" Last Change: 2019 Dec. 14
|
" Last Change: 2020 Apr 20
|
||||||
|
" Patched By: Eisuke Kawashima
|
||||||
" 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:
|
||||||
@ -53,10 +54,10 @@ if !exists("b:fortran_fixed_source")
|
|||||||
elseif exists("fortran_fixed_source")
|
elseif exists("fortran_fixed_source")
|
||||||
" User guarantees fixed source form for all fortran files
|
" User guarantees fixed source form for all fortran files
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
elseif expand("%:e") ==? "f\<90\|95\|03\|08\>"
|
elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$'
|
||||||
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
||||||
let b:fortran_fixed_source = 0
|
let b:fortran_fixed_source = 0
|
||||||
elseif expand("%:e") ==? "f\|f77\|for"
|
elseif expand("%:e") =~? '^\%(f\|f77\|for\)$'
|
||||||
" Fixed-form file extension defaults
|
" Fixed-form file extension defaults
|
||||||
let b:fortran_fixed_source = 1
|
let b:fortran_fixed_source = 1
|
||||||
else
|
else
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||||
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
|
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
|
||||||
" Version Info:
|
" Version Info:
|
||||||
" Last Change: 2015 Nov 24
|
" Last Change: 2020 Apr 15
|
||||||
|
|
||||||
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
|
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
|
||||||
" * manSubHeading
|
" * manSubHeading
|
||||||
@ -18,8 +18,11 @@ endif
|
|||||||
runtime! syntax/ctrlh.vim
|
runtime! syntax/ctrlh.vim
|
||||||
|
|
||||||
syn case ignore
|
syn case ignore
|
||||||
|
|
||||||
|
syn match manHeader '\%1l.*'
|
||||||
|
exe 'syn match manFooter ''\%' . line('$') . 'l.*'''
|
||||||
|
|
||||||
syn match manReference "\f\+([1-9][a-z]\=)"
|
syn match manReference "\f\+([1-9][a-z]\=)"
|
||||||
syn match manTitle "^\f\+([0-9]\+[a-z]\=).*"
|
|
||||||
syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
|
syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
|
||||||
syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
|
syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
|
||||||
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
|
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
|
||||||
@ -36,7 +39,9 @@ endif
|
|||||||
" Define the default highlighting.
|
" Define the default highlighting.
|
||||||
" Only when an item doesn't have highlighting yet
|
" Only when an item doesn't have highlighting yet
|
||||||
|
|
||||||
hi def link manTitle Title
|
hi def link manHeader Title
|
||||||
|
hi def link manFooter PreProc
|
||||||
|
|
||||||
hi def link manSectionHeading Statement
|
hi def link manSectionHeading Statement
|
||||||
hi def link manOptionDesc Constant
|
hi def link manOptionDesc Constant
|
||||||
hi def link manLongOptionDesc Constant
|
hi def link manLongOptionDesc Constant
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Perl 5
|
" Language: Perl 5
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl/tree/master
|
" Homepage: https://github.com/vim-perl/vim-perl/tree/master
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2017-09-12
|
" Last Change: 2020 Apr 15
|
||||||
" Contributors: Andy Lester <andy@petdance.com>
|
" Contributors: Andy Lester <andy@petdance.com>
|
||||||
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||||
" Lukas Mai <l.mai.web.de>
|
" Lukas Mai <l.mai.web.de>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Perl 6
|
" Language: Perl 6
|
||||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
" Homepage: http://github.com/vim-perl/vim-perl/tree/master
|
" Homepage: https://github.com/vim-perl/vim-perl/tree/master
|
||||||
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
|
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||||
" Last Change: 2013-07-21
|
" Last Change: 2020 Apr 15
|
||||||
|
|
||||||
" Contributors: Luke Palmer <fibonaci@babylonia.flatirons.org>
|
" Contributors: Luke Palmer <fibonaci@babylonia.flatirons.org>
|
||||||
" Moritz Lenz <moritz@faui2k3.org>
|
" Moritz Lenz <moritz@faui2k3.org>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
" Vim syntax support file
|
" Vim syntax support file
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2016 Nov 04
|
" Last Change: 2020 Apr 13
|
||||||
|
|
||||||
" This file sets up for syntax highlighting.
|
" This file sets up for syntax highlighting.
|
||||||
" It is loaded from "syntax.vim" and "manual.vim".
|
" It is loaded from "syntax.vim" and "manual.vim".
|
||||||
@ -52,9 +52,11 @@ fun! s:SynSet()
|
|||||||
|
|
||||||
if s != ""
|
if s != ""
|
||||||
" Load the syntax file(s). When there are several, separated by dots,
|
" Load the syntax file(s). When there are several, separated by dots,
|
||||||
" load each in sequence.
|
" load each in sequence. Skip empty entries.
|
||||||
for name in split(s, '\.')
|
for name in split(s, '\.')
|
||||||
exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
|
if !empty(name)
|
||||||
|
exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
|
||||||
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
endfun
|
endfun
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Vim 8.0 script
|
" Language: Vim 8.0 script
|
||||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||||
" Last Change: March 11, 2020
|
" Last Change: Apr 15, 2020
|
||||||
" Version: 8.0-30
|
" Version: 8.0-33
|
||||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||||
" Automatically generated keyword lists: {{{1
|
" Automatically generated keyword lists: {{{1
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ syn keyword vimAugroupKey contained aug[roup]
|
|||||||
|
|
||||||
" Operators: {{{2
|
" Operators: {{{2
|
||||||
" =========
|
" =========
|
||||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
|
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue,vim9Comment
|
||||||
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
|
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
|
||||||
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
|
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
|
||||||
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
|
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
|
||||||
@ -265,7 +265,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
|
|||||||
|
|
||||||
" User-Specified Commands: {{{2
|
" User-Specified Commands: {{{2
|
||||||
" =======================
|
" =======================
|
||||||
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
|
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
|
||||||
syn keyword vimUserCommand contained com[mand]
|
syn keyword vimUserCommand contained com[mand]
|
||||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
|
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
|
||||||
syn match vimUserAttrbError contained "-\a\+\ze\s"
|
syn match vimUserAttrbError contained "-\a\+\ze\s"
|
||||||
@ -295,6 +295,12 @@ syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup
|
|||||||
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
|
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
|
||||||
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
|
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
|
||||||
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
|
||||||
|
" Vim9 comments - TODO: might be highlighted while they don't work
|
||||||
|
syn match vimComment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
|
||||||
|
syn match vimComment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
|
||||||
|
syn match vimComment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
|
||||||
|
" Vim9 comment inside expression
|
||||||
|
syn match vim9Comment +\s\zs#[^{].*$+ contains=@vimCommentGroup,vimCommentString
|
||||||
|
|
||||||
" Environment Variables: {{{2
|
" Environment Variables: {{{2
|
||||||
" =====================
|
" =====================
|
||||||
@ -372,7 +378,7 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
|
|||||||
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
||||||
|
|
||||||
" Set command and associated set-options (vimOptions) with comment {{{2
|
" Set command and associated set-options (vimOptions) with comment {{{2
|
||||||
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
|
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
|
||||||
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
|
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
|
||||||
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
|
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
|
||||||
syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
|
syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
|
||||||
@ -381,7 +387,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
|
|||||||
" Let: {{{2
|
" Let: {{{2
|
||||||
" ===
|
" ===
|
||||||
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
|
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
|
||||||
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment
|
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment,vim9Comment
|
||||||
|
|
||||||
" Abbreviations: {{{2
|
" Abbreviations: {{{2
|
||||||
" =============
|
" =============
|
||||||
@ -427,7 +433,7 @@ syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMen
|
|||||||
syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
|
syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
|
||||||
syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
|
syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
|
||||||
syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs
|
syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs
|
||||||
syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand
|
syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vim9Comment,vimIsCommand
|
||||||
syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
|
syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
|
||||||
|
|
||||||
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
|
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
|
||||||
@ -477,8 +483,8 @@ syn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupLis
|
|||||||
syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList
|
syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList
|
||||||
syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList
|
syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList
|
||||||
|
|
||||||
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
|
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
|
||||||
syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
|
syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
|
||||||
syn cluster vimFuncBodyList add=vimSyntax
|
syn cluster vimFuncBodyList add=vimSyntax
|
||||||
|
|
||||||
" Syntax: case {{{2
|
" Syntax: case {{{2
|
||||||
@ -515,7 +521,7 @@ syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skip
|
|||||||
syn cluster vimFuncBodyList add=vimSynType
|
syn cluster vimFuncBodyList add=vimSynType
|
||||||
|
|
||||||
" Syntax: match {{{2
|
" Syntax: match {{{2
|
||||||
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
|
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vim9Comment
|
||||||
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
||||||
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
|
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
|
||||||
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||||
@ -569,7 +575,7 @@ syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotatio
|
|||||||
|
|
||||||
" Highlighting: {{{2
|
" Highlighting: {{{2
|
||||||
" ============
|
" ============
|
||||||
syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
|
syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment,vim9Comment
|
||||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
|
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
|
||||||
syn match vimHiCtermError contained "\D\i*"
|
syn match vimHiCtermError contained "\D\i*"
|
||||||
endif
|
endif
|
||||||
@ -624,6 +630,7 @@ syn match vimCtrlChar "[--]"
|
|||||||
" Beginners - Patterns that involve ^ {{{2
|
" Beginners - Patterns that involve ^ {{{2
|
||||||
" =========
|
" =========
|
||||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||||
|
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||||
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
||||||
syn match vimContinue "^\s*\\"
|
syn match vimContinue "^\s*\\"
|
||||||
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
|
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
|
||||||
@ -738,10 +745,10 @@ if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath)
|
|||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn cluster vimFuncBodyList add=vimPythonRegion
|
syn cluster vimFuncBodyList add=vimPythonRegion
|
||||||
exe "syn include @vimPythonScript ".s:pythonpath
|
exe "syn include @vimPythonScript ".s:pythonpath
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
|
||||||
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
|
||||||
syn cluster vimFuncBodyList add=vimPythonRegion
|
syn cluster vimFuncBodyList add=vimPythonRegion
|
||||||
else
|
else
|
||||||
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
||||||
@ -857,6 +864,7 @@ if !exists("skip_vim_syntax_inits")
|
|||||||
hi def link vimCmplxRepeat SpecialChar
|
hi def link vimCmplxRepeat SpecialChar
|
||||||
hi def link vimCommand Statement
|
hi def link vimCommand Statement
|
||||||
hi def link vimComment Comment
|
hi def link vimComment Comment
|
||||||
|
hi def link vim9Comment Comment
|
||||||
hi def link vimCommentString vimString
|
hi def link vimCommentString vimString
|
||||||
hi def link vimCommentTitle PreProc
|
hi def link vimCommentTitle PreProc
|
||||||
hi def link vimCondHL vimCommand
|
hi def link vimCondHL vimCommand
|
||||||
@ -906,6 +914,7 @@ if !exists("skip_vim_syntax_inits")
|
|||||||
hi def link vimLetHereDocStart Special
|
hi def link vimLetHereDocStart Special
|
||||||
hi def link vimLetHereDocStop Special
|
hi def link vimLetHereDocStop Special
|
||||||
hi def link vimLineComment vimComment
|
hi def link vimLineComment vimComment
|
||||||
|
hi def link vim9LineComment vimComment
|
||||||
hi def link vimMapBang vimCommand
|
hi def link vimMapBang vimCommand
|
||||||
hi def link vimMapModKey vimFuncSID
|
hi def link vimMapModKey vimFuncSID
|
||||||
hi def link vimMapMod vimBracket
|
hi def link vimMapMod vimBracket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user