mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
Update runtime files
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
*change.txt* For Vim version 8.2. Last change: 2020 Apr 11
|
*change.txt* For Vim version 8.2. Last change: 2020 Apr 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -996,9 +996,9 @@ inside of strings can change! Also see 'softtabstop' option. >
|
|||||||
5. Copying and moving text *copy-move*
|
5. Copying and moving text *copy-move*
|
||||||
|
|
||||||
*quote*
|
*quote*
|
||||||
"{a-zA-Z0-9.%#:-"} Use register {a-zA-Z0-9.%#:-"} for next delete, yank
|
"{register} Use {register} for next delete, yank or put. Use
|
||||||
or put (use uppercase character to append with
|
an uppercase character to append with delete and yank.
|
||||||
delete and yank) ({.%#:} only work with put).
|
Registers ".", "%", "#" and ":" only work with put.
|
||||||
|
|
||||||
*:reg* *:registers*
|
*:reg* *:registers*
|
||||||
:reg[isters] Display the type and contents of all numbered and
|
:reg[isters] Display the type and contents of all numbered and
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*cmdline.txt* For Vim version 8.2. Last change: 2020 Feb 29
|
*cmdline.txt* For Vim version 8.2. Last change: 2020 Apr 23
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -615,6 +615,7 @@ followed by another Vim command:
|
|||||||
:tcl
|
:tcl
|
||||||
:tcldo
|
:tcldo
|
||||||
:tclfile
|
:tclfile
|
||||||
|
:terminal
|
||||||
:vglobal
|
:vglobal
|
||||||
:windo
|
:windo
|
||||||
:write !
|
:write !
|
||||||
|
@ -2646,7 +2646,7 @@ prop_clear({lnum} [, {lnum-end} [, {props}]])
|
|||||||
none remove all text properties
|
none remove all text properties
|
||||||
prop_find({props} [, {direction}])
|
prop_find({props} [, {direction}])
|
||||||
Dict search for a text property
|
Dict search for a text property
|
||||||
prop_list({lnum} [, {props}) List text properties in {lnum}
|
prop_list({lnum} [, {props}]) List text properties in {lnum}
|
||||||
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||||
Number remove a text property
|
Number remove a text property
|
||||||
prop_type_add({name}, {props}) none define a new property type
|
prop_type_add({name}, {props}) none define a new property type
|
||||||
@ -2654,7 +2654,7 @@ prop_type_change({name}, {props})
|
|||||||
none change an existing property type
|
none change an existing property type
|
||||||
prop_type_delete({name} [, {props}])
|
prop_type_delete({name} [, {props}])
|
||||||
none delete a property type
|
none delete a property type
|
||||||
prop_type_get([{name} [, {props}])
|
prop_type_get([{name} [, {props}]])
|
||||||
Dict get property type values
|
Dict get property type values
|
||||||
prop_type_list([{props}]) List get list of property types
|
prop_type_list([{props}]) List get list of property types
|
||||||
pum_getpos() Dict position and size of pum if visible
|
pum_getpos() Dict position and size of pum if visible
|
||||||
@ -3050,7 +3050,7 @@ arglistid([{winnr} [, {tabnr}]])
|
|||||||
{winnr} can be the window number or the |window-ID|.
|
{winnr} can be the window number or the |window-ID|.
|
||||||
|
|
||||||
*argv()*
|
*argv()*
|
||||||
argv([{nr} [, {winid}])
|
argv([{nr} [, {winid}]])
|
||||||
The result is the {nr}th file in the argument list. See
|
The result is the {nr}th file in the argument list. See
|
||||||
|arglist|. "argv(0)" is the first one. Example: >
|
|arglist|. "argv(0)" is the first one. Example: >
|
||||||
:let i = 0
|
:let i = 0
|
||||||
@ -5854,7 +5854,7 @@ has({feature} [, {check}])
|
|||||||
|
|
||||||
Note that to skip code that has a syntax error when the
|
Note that to skip code that has a syntax error when the
|
||||||
feature is not available, Vim may skip the rest of the line
|
feature is not available, Vim may skip the rest of the line
|
||||||
and miss a following `endif`. Therfore put the `endif` on a
|
and miss a following `endif`. Therefore put the `endif` on a
|
||||||
separate line: >
|
separate line: >
|
||||||
if has('feature')
|
if has('feature')
|
||||||
let x = this->breaks->without->the->feature
|
let x = this->breaks->without->the->feature
|
||||||
|
@ -198,13 +198,13 @@ Remarks about specific systems ~
|
|||||||
|os_amiga.txt| Amiga
|
|os_amiga.txt| Amiga
|
||||||
|os_beos.txt| BeOS and BeBox
|
|os_beos.txt| BeOS and BeBox
|
||||||
|os_dos.txt| MS-DOS and MS-Windows common items
|
|os_dos.txt| MS-DOS and MS-Windows common items
|
||||||
|
|os_haiku.txt| Haiku
|
||||||
|os_mac.txt| Macintosh
|
|os_mac.txt| Macintosh
|
||||||
|os_mint.txt| Atari MiNT
|
|os_mint.txt| Atari MiNT
|
||||||
|os_msdos.txt| MS-DOS (plain DOS and DOS box under Windows)
|
|os_msdos.txt| MS-DOS (plain DOS and DOS box under Windows)
|
||||||
|os_os2.txt| OS/2
|
|os_os2.txt| OS/2
|
||||||
|os_qnx.txt| QNX
|
|os_qnx.txt| QNX
|
||||||
|os_risc.txt| RISC-OS
|
|os_risc.txt| RISC-OS
|
||||||
|os_haiku.txt| Haiku
|
|
||||||
|os_unix.txt| Unix
|
|os_unix.txt| Unix
|
||||||
|os_vms.txt| VMS
|
|os_vms.txt| VMS
|
||||||
|os_win32.txt| MS-Windows
|
|os_win32.txt| MS-Windows
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*index.txt* For Vim version 8.2. Last change: 2020 Mar 27
|
*index.txt* For Vim version 8.2. Last change: 2020 Apr 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -246,8 +246,7 @@ tag char note action in Normal mode ~
|
|||||||
2 filter Nmove text through the {filter}
|
2 filter Nmove text through the {filter}
|
||||||
command
|
command
|
||||||
|!!| !!{filter} 2 filter N lines through the {filter} command
|
|!!| !!{filter} 2 filter N lines through the {filter} command
|
||||||
|quote| "{a-zA-Z0-9.%#:-"} use register {a-zA-Z0-9.%#:-"} for next
|
|quote| "{register} use {register} for next delete, yank or put
|
||||||
delete, yank or put (uppercase to append)
|
|
||||||
({.%#:} only work with put)
|
({.%#:} only work with put)
|
||||||
|#| # 1 search backward for the Nth occurrence of
|
|#| # 1 search backward for the Nth occurrence of
|
||||||
the ident under the cursor
|
the ident under the cursor
|
||||||
@ -1115,7 +1114,7 @@ tag char action in Terminal-Job mode ~
|
|||||||
|t_CTRL-W_:| CTRL-W : enter an Ex command
|
|t_CTRL-W_:| CTRL-W : enter an Ex command
|
||||||
|t_CTRL-W_.| CTRL-W . type CTRL-W in the terminal
|
|t_CTRL-W_.| CTRL-W . type CTRL-W in the terminal
|
||||||
CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
|
CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
|
||||||
|t_CTRL-W_quote| CTRL-W " {0-9a-z"%#*:=}
|
|t_CTRL-W_quote| CTRL-W " {register}
|
||||||
paste register in the terminal
|
paste register in the terminal
|
||||||
|t_CTRL-W_CTRL-C| CTRL-W CTRL-C forcefully ends the job
|
|t_CTRL-W_CTRL-C| CTRL-W CTRL-C forcefully ends the job
|
||||||
|t_CTRL-W_CTRL-W| CTRL-W CTRL-W move focus to the next window
|
|t_CTRL-W_CTRL-W| CTRL-W CTRL-W move focus to the next window
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*insert.txt* For Vim version 8.2. Last change: 2020 Mar 25
|
*insert.txt* For Vim version 8.2. Last change: 2020 Apr 30
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -666,7 +666,7 @@ Note: The keys that are valid in CTRL-X mode are not mapped. This allows for
|
|||||||
ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped.
|
ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped.
|
||||||
Also, when doing completion with 'complete' mappings apply as usual.
|
Also, when doing completion with 'complete' mappings apply as usual.
|
||||||
|
|
||||||
*E565*
|
*E578* *E565*
|
||||||
Note: While completion is active Insert mode can't be used recursively and
|
Note: While completion is active Insert mode can't be used recursively and
|
||||||
buffer text cannot be changed. Mappings that somehow invoke ":normal i.."
|
buffer text cannot be changed. Mappings that somehow invoke ":normal i.."
|
||||||
will generate an E565 error.
|
will generate an E565 error.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*map.txt* For Vim version 8.2. Last change: 2019 Dec 19
|
*map.txt* For Vim version 8.2. Last change: 2020 Apr 23
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1492,7 +1492,7 @@ The valid escape sequences are
|
|||||||
<bang> (See the '-bang' attribute) Expands to a ! if the
|
<bang> (See the '-bang' attribute) Expands to a ! if the
|
||||||
command was executed with a ! modifier, otherwise
|
command was executed with a ! modifier, otherwise
|
||||||
expands to nothing.
|
expands to nothing.
|
||||||
*<mods>*
|
*<mods>* *:command-modifiers*
|
||||||
<mods> The command modifiers, if specified. Otherwise, expands to
|
<mods> The command modifiers, if specified. Otherwise, expands to
|
||||||
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|
||||||
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|
||||||
|
@ -25,8 +25,9 @@ targets personal computing.
|
|||||||
9. The meta key modifier |haiku-meta|
|
9. The meta key modifier |haiku-meta|
|
||||||
10. Mouse key mappings |haiku-mouse|
|
10. Mouse key mappings |haiku-mouse|
|
||||||
11. Color names |haiku-colors|
|
11. Color names |haiku-colors|
|
||||||
12. Credits |haiku-support-credits|
|
12. GUI Toolbar Images |haiku-toolbar-images|
|
||||||
13. Bugs & to-do |haiku-bugs|
|
13. Credits |haiku-support-credits|
|
||||||
|
14. Bugs & to-do |haiku-bugs|
|
||||||
|
|
||||||
|
|
||||||
1. General *haiku-general*
|
1. General *haiku-general*
|
||||||
@ -223,7 +224,7 @@ All the changes and patches released under vim-license.
|
|||||||
Thank you, all!
|
Thank you, all!
|
||||||
|
|
||||||
|
|
||||||
13. Bugs & to-do *haiku-bugs*
|
14. Bugs & to-do *haiku-bugs*
|
||||||
|
|
||||||
The port is under development now and far away from the perfect state. For bug
|
The port is under development now and far away from the perfect state. For bug
|
||||||
reports, patches and wishes, please use the Vim mailing list or Vim Github
|
reports, patches and wishes, please use the Vim mailing list or Vim Github
|
||||||
|
@ -230,7 +230,7 @@ A. VisionFS can't handle certain dot (.) three letter extension file names.
|
|||||||
SCO declares this behavior required for backwards compatibility with 16bit
|
SCO declares this behavior required for backwards compatibility with 16bit
|
||||||
DOS/Windows environments. The two commands below demonstrate the behavior:
|
DOS/Windows environments. The two commands below demonstrate the behavior:
|
||||||
>
|
>
|
||||||
echo Hello > file.bat~
|
echo Hello > file.bat~
|
||||||
dir > file.bat
|
dir > file.bat
|
||||||
<
|
<
|
||||||
The result is that the "dir" command updates the "file.bat~" file, instead
|
The result is that the "dir" command updates the "file.bat~" file, instead
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*repeat.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
*repeat.txt* For Vim version 8.2. Last change: 2020 Apr 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -166,7 +166,7 @@ q Stops recording. (Implementation note: The 'q' that
|
|||||||
[addr] (default is current line).
|
[addr] (default is current line).
|
||||||
|
|
||||||
:[addr]@ *:@@*
|
:[addr]@ *:@@*
|
||||||
:[addr]@@ Repeat the previous :@{0-9a-z"}. First set cursor at
|
:[addr]@@ Repeat the previous :@{register}. First set cursor at
|
||||||
line [addr] (default is current line).
|
line [addr] (default is current line).
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
@ -2272,6 +2272,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
|||||||
:command-completion-custom map.txt /*:command-completion-custom*
|
:command-completion-custom map.txt /*:command-completion-custom*
|
||||||
:command-completion-customlist map.txt /*:command-completion-customlist*
|
:command-completion-customlist map.txt /*:command-completion-customlist*
|
||||||
:command-count map.txt /*:command-count*
|
:command-count map.txt /*:command-count*
|
||||||
|
:command-modifiers map.txt /*:command-modifiers*
|
||||||
:command-nargs map.txt /*:command-nargs*
|
:command-nargs map.txt /*:command-nargs*
|
||||||
:command-range map.txt /*:command-range*
|
:command-range map.txt /*:command-range*
|
||||||
:command-register map.txt /*:command-register*
|
:command-register map.txt /*:command-register*
|
||||||
@ -4363,6 +4364,7 @@ E561 if_cscop.txt /*E561*
|
|||||||
E562 if_cscop.txt /*E562*
|
E562 if_cscop.txt /*E562*
|
||||||
E563 if_cscop.txt /*E563*
|
E563 if_cscop.txt /*E563*
|
||||||
E564 if_cscop.txt /*E564*
|
E564 if_cscop.txt /*E564*
|
||||||
|
E565 insert.txt /*E565*
|
||||||
E566 if_cscop.txt /*E566*
|
E566 if_cscop.txt /*E566*
|
||||||
E567 if_cscop.txt /*E567*
|
E567 if_cscop.txt /*E567*
|
||||||
E568 if_cscop.txt /*E568*
|
E568 if_cscop.txt /*E568*
|
||||||
@ -4374,6 +4376,7 @@ E574 starting.txt /*E574*
|
|||||||
E575 starting.txt /*E575*
|
E575 starting.txt /*E575*
|
||||||
E576 starting.txt /*E576*
|
E576 starting.txt /*E576*
|
||||||
E577 starting.txt /*E577*
|
E577 starting.txt /*E577*
|
||||||
|
E578 insert.txt /*E578*
|
||||||
E579 eval.txt /*E579*
|
E579 eval.txt /*E579*
|
||||||
E580 eval.txt /*E580*
|
E580 eval.txt /*E580*
|
||||||
E581 eval.txt /*E581*
|
E581 eval.txt /*E581*
|
||||||
@ -9959,6 +9962,7 @@ 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 vim9.txt /*vim9*
|
||||||
vim9-differences vim9.txt /*vim9-differences*
|
vim9-differences vim9.txt /*vim9-differences*
|
||||||
vim9-export vim9.txt /*vim9-export*
|
vim9-export vim9.txt /*vim9-export*
|
||||||
vim9-import vim9.txt /*vim9-import*
|
vim9-import vim9.txt /*vim9-import*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*terminal.txt* For Vim version 8.2. Last change: 2020 Mar 26
|
*terminal.txt* For Vim version 8.2. Last change: 2020 Apr 23
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -120,7 +120,7 @@ break (cursor keys start with an Esc, so they may break): >
|
|||||||
You can also create menus similar to terminal mode mappings, but you have to
|
You can also create menus similar to terminal mode mappings, but you have to
|
||||||
use |:tlmenu| instead of |:tmenu|.
|
use |:tlmenu| instead of |:tmenu|.
|
||||||
|
|
||||||
< *options-in-terminal*
|
*options-in-terminal*
|
||||||
After opening the terminal window and setting 'buftype' to "terminal" the
|
After opening the terminal window and setting 'buftype' to "terminal" the
|
||||||
TerminalOpen autocommand event is triggered. This makes it possible to set
|
TerminalOpen autocommand event is triggered. This makes it possible to set
|
||||||
options specifically for the window and buffer. Example: >
|
options specifically for the window and buffer. Example: >
|
||||||
@ -183,6 +183,10 @@ Command syntax ~
|
|||||||
keep the terminal open in Terminal-Normal mode. This
|
keep the terminal open in Terminal-Normal mode. This
|
||||||
can be changed with the ++close argument.
|
can be changed with the ++close argument.
|
||||||
|
|
||||||
|
No Vim command can follow, any | is included in
|
||||||
|
[command]. Use `:execute` if you must have a Vim
|
||||||
|
command following in the same line.
|
||||||
|
|
||||||
A new buffer will be created, using [command] or
|
A new buffer will be created, using [command] or
|
||||||
'shell' as the name, prefixed with a "!". If a buffer
|
'shell' as the name, prefixed with a "!". If a buffer
|
||||||
by this name already exists a number is added in
|
by this name already exists a number is added in
|
||||||
|
@ -101,7 +101,7 @@ Manipulating text property types:
|
|||||||
prop_type_add({name}, {props}) define a new property type
|
prop_type_add({name}, {props}) define a new property type
|
||||||
prop_type_change({name}, {props}) change an existing property type
|
prop_type_change({name}, {props}) change an existing property type
|
||||||
prop_type_delete({name} [, {props}]) delete a property type
|
prop_type_delete({name} [, {props}]) delete a property type
|
||||||
prop_type_get([{name} [, {props}]) get property type values
|
prop_type_get([{name} [, {props}]]) get property type values
|
||||||
prop_type_list([{props}]) get list of property types
|
prop_type_list([{props}]) get list of property types
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ prop_add({lnum}, {col}, {props}) add a text property
|
|||||||
prop_clear({lnum} [, {lnum-end} [, {bufnr}]])
|
prop_clear({lnum} [, {lnum-end} [, {bufnr}]])
|
||||||
remove all text properties
|
remove all text properties
|
||||||
prop_find({props} [, {direction}]) search for a text property
|
prop_find({props} [, {direction}]) search for a text property
|
||||||
prop_list({lnum} [, {props}) text properties in {lnum}
|
prop_list({lnum} [, {props}]) text properties in {lnum}
|
||||||
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||||
remove a text property
|
remove a text property
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
|
|||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetPropName()->prop_type_delete()
|
GetPropName()->prop_type_delete()
|
||||||
|
|
||||||
prop_type_get([{name} [, {props}]) *prop_type_get()*
|
prop_type_get([{name} [, {props}]]) *prop_type_get()*
|
||||||
Returns the properties of property type {name}. This is a
|
Returns the properties of property type {name}. This is a
|
||||||
dictionary with the same fields as was given to
|
dictionary with the same fields as was given to
|
||||||
prop_type_add().
|
prop_type_add().
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*todo.txt* For Vim version 8.2. Last change: 2020 Apr 20
|
*todo.txt* For Vim version 8.2. Last change: 2020 Apr 30
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -39,38 +39,59 @@ 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:
|
Big changes, need design:
|
||||||
check all calls to ends_excmd() and test that space before # is needed.
|
- Make closures work:
|
||||||
next: ex_findpat()
|
Grab the part of the stack that has the arguments and local vars.
|
||||||
func and partial types:
|
Pass a pointer and offset to the closure where this stack fragment is (frame
|
||||||
- Calling unknown user function does not give proper error message:
|
pointer).
|
||||||
assert_equal('123text', RefDef2Arg()) typo for "RetDef2Arg"
|
When a closure disappears at end of the function - nothing to do.
|
||||||
- "func" inside "vim9script" doesn't work? (Ben Jackson, #5670)
|
When a closure remains at end of the function: copy frame, attach to closure.
|
||||||
- :func inside vim9script must still use a:arg
|
- At the vim9 script level: Allow using a function that is defined later.
|
||||||
- define function and create funcref in one step:
|
Requires compiling functions only when the whole script has been sourced.
|
||||||
let ref = def(arg: type): rettype
|
Like Javascript "hoisting", but only at the script level:
|
||||||
body
|
1. Discovery phase: Read the file to find all functions, variable
|
||||||
enddef
|
declarations and imports If a variable has a constant expression we get
|
||||||
|
the type, otherwise it will be "any". Follow imports recursively.
|
||||||
|
2. Compilation phase: compile :def function bodies, using declared types
|
||||||
|
3. Execution phase: Execute imports when encountered. (skip over functions)
|
||||||
|
- When sourcing a script again, also delete script-local variables.
|
||||||
|
Making everything work:
|
||||||
- Test that a script-local function in Vim9 script cannot be deleted.
|
- 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
|
- 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
|
function, g: functions can be defined and script-local functions cannot be
|
||||||
defined.
|
defined.
|
||||||
Also:
|
- Check that when using a user function name without prefix, it does not find
|
||||||
- When wildcards are expanded, find `=expr` and evaluate it before invoking
|
a global function. Prefixing g: is required.
|
||||||
the command. For example: :edit `=filename`
|
- Compile let [var, var] = expr
|
||||||
|
- Compile replacement of :s command: s/pat/\=expr/
|
||||||
|
- Compile redir to local variable: var_redir_start().
|
||||||
|
- Compile builtin functions that access local variables:
|
||||||
|
islocked()
|
||||||
|
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||||
|
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||||
|
- Expand `=expr` in :mkspell
|
||||||
|
- Support type for ":let"/":const" at script level for Vim9 script.
|
||||||
|
(Ben Jackson, #5671)
|
||||||
|
Can we share the code from ex_let_const() between direct execution and
|
||||||
|
compiling?
|
||||||
|
- Disallow unlet for local/script/imported vars
|
||||||
|
- Make "++nr" work.
|
||||||
|
- expandcmd() with `=expr` in filename uses legacy expression.
|
||||||
|
- eval_expr() in ex_cexpr()
|
||||||
|
- eval_expr() call in dbg_parsearg() and debuggy_find()
|
||||||
|
New syntax and functionality:
|
||||||
|
- define function and create funcref in one step:
|
||||||
|
let ref = def(arg: type): rettype
|
||||||
|
body
|
||||||
|
enddef
|
||||||
|
Improve error checking:
|
||||||
- "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
|
Also:
|
||||||
compiled.
|
|
||||||
- For range: make table of first ASCII character with flag to quickly check if
|
- 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.
|
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)
|
||||||
- Support type for ":let"/":const" at script level for Vim9 script.
|
|
||||||
(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.
|
|
||||||
- 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.
|
||||||
- Find a way to test expressions in legacy and Vim9 script without duplication
|
- Find a way to test expressions in legacy and Vim9 script without duplication
|
||||||
@ -93,6 +114,13 @@ Also:
|
|||||||
- Make accessing varargs faster: arg[expr]
|
- Make accessing varargs faster: arg[expr]
|
||||||
EVAL expr
|
EVAL expr
|
||||||
LOADVARARG (varags idx)
|
LOADVARARG (varags idx)
|
||||||
|
Further improvements:
|
||||||
|
- compile options that are an expression, e.g. "expr:" in 'spellsuggest',
|
||||||
|
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
|
||||||
|
'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
|
||||||
|
- compile get_lambda_tv() in popup_add_timeout()
|
||||||
|
- compile "skip" argument of searchpair()
|
||||||
|
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||||
|
|
||||||
Popup windows:
|
Popup windows:
|
||||||
- With some sequence get get hidden finished terminal buffer. (#5768)
|
- With some sequence get get hidden finished terminal buffer. (#5768)
|
||||||
@ -198,7 +226,7 @@ Terminal emulator window:
|
|||||||
conversions.
|
conversions.
|
||||||
|
|
||||||
Error numbers available:
|
Error numbers available:
|
||||||
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
|
E453, E454, E460, E489, E491, E610, E611, E653,
|
||||||
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
|
||||||
@ -222,8 +250,13 @@ Ready to include.
|
|||||||
|
|
||||||
Patch to add "-d" to xxd. (#5616)
|
Patch to add "-d" to xxd. (#5616)
|
||||||
|
|
||||||
|
Patch for the Haiku port: #5961
|
||||||
|
|
||||||
Patch to add Turkish manual. (Emir Sarı, #5641)
|
Patch to add Turkish manual. (Emir Sarı, #5641)
|
||||||
|
|
||||||
|
Patch to support different color for undercurl in cterm.
|
||||||
|
(Timur Celik, #6011)
|
||||||
|
|
||||||
Patch to support cindent option to handle pragmas differently.
|
Patch to support cindent option to handle pragmas differently.
|
||||||
(Max Rumpf, #5468)
|
(Max Rumpf, #5468)
|
||||||
|
|
||||||
@ -234,6 +267,9 @@ manager. Problem with Motif? Now test_gui crashes in submenu_change().
|
|||||||
Athena is OK.
|
Athena is OK.
|
||||||
Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
||||||
|
|
||||||
|
:map output does not clear the reset of the command line.
|
||||||
|
(#5623, also see #5962)
|
||||||
|
|
||||||
Patch to properly break CJK lines: Anton Kochkov, #3875
|
Patch to properly break CJK lines: Anton Kochkov, #3875
|
||||||
Flag in 'formatoptions' is not used in the tests.
|
Flag in 'formatoptions' is not used in the tests.
|
||||||
|
|
||||||
@ -248,7 +284,10 @@ Ready to include? Review the code.
|
|||||||
When 'lazyredraw' is set sometimes the title is not updated.
|
When 'lazyredraw' is set sometimes the title is not updated.
|
||||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||||
|
|
||||||
Patch to delete BeOS code. (#5817)
|
Patch to delete BeOS code. (#5817) Anyone who wants to keep it?
|
||||||
|
|
||||||
|
With bash ":make" does not set v:shell_error. Possible solution: set
|
||||||
|
'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994
|
||||||
|
|
||||||
Strange sequence of BufWipeout and BufNew events while doing omni-complete.
|
Strange sequence of BufWipeout and BufNew events while doing omni-complete.
|
||||||
(Paul Jolly, #5656)
|
(Paul Jolly, #5656)
|
||||||
@ -317,6 +356,8 @@ unlisted. (#4478)
|
|||||||
|
|
||||||
Patch to include reduce() function. (#5481)
|
Patch to include reduce() function. (#5481)
|
||||||
|
|
||||||
|
When SIGTSTP is ignored, don't let CTRL-Z suspend Vim? (Kurtis Rader, #5990)
|
||||||
|
|
||||||
Statusline highlighting error, off by one. (#5599)
|
Statusline highlighting error, off by one. (#5599)
|
||||||
|
|
||||||
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
|
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
|
||||||
@ -331,11 +372,6 @@ 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
|
||||||
support combining characters. (Charles Campbell) Also #4687
|
support combining characters. (Charles Campbell) Also #4687
|
||||||
|
|
||||||
Include Haiku port. (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
|
|
||||||
It can replace the BeOS code, which is likely not used anymore.
|
|
||||||
Now on github: #1856. Updated Oct 2017
|
|
||||||
Got permission to include this under the Vim license.
|
|
||||||
|
|
||||||
"--cleanFOO" does not result in an error. (#5537)
|
"--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)
|
||||||
|
@ -402,7 +402,7 @@ Another way to start in diff mode can be done from inside Vim. Edit the
|
|||||||
"main.c" file, then make a split and show the differences: >
|
"main.c" file, then make a split and show the differences: >
|
||||||
|
|
||||||
:edit main.c
|
:edit main.c
|
||||||
:vertical diffsplit main.c~
|
:vertical diffsplit main.c~
|
||||||
|
|
||||||
The ":vertical" command is used to make the window split vertically. If you
|
The ":vertical" command is used to make the window split vertically. If you
|
||||||
omit this, you will get a horizontal split.
|
omit this, you will get a horizontal split.
|
||||||
|
@ -687,7 +687,7 @@ with any motion command, with text objects and in Visual mode.
|
|||||||
lowercase. This can be shortened to "guu". "gUgU" is shortened to "gUU" and
|
lowercase. This can be shortened to "guu". "gUgU" is shortened to "gUU" and
|
||||||
"g~g~" to "g~~". Example: >
|
"g~g~" to "g~~". Example: >
|
||||||
|
|
||||||
g~~
|
g~~
|
||||||
< Some GIRLS have Fun ----> sOME girls HAVE fUN ~
|
< Some GIRLS have Fun ----> sOME girls HAVE fUN ~
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 30
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||||
|
|
||||||
Vim9 script commands and expressions.
|
Vim9 script commands and expressions. *vim9*
|
||||||
|
|
||||||
Most expression help is in |eval.txt|. This file is about the new syntax and
|
Most expression help is in |eval.txt|. This file is about the new syntax and
|
||||||
features in Vim9 script.
|
features in Vim9 script.
|
||||||
@ -28,29 +28,32 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
|||||||
|
|
||||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||||
|
|
||||||
Vim script has been growing over time, while keeping backwards compatibility.
|
Vim script has been growing over time, while preserving backwards
|
||||||
That means bad choices from the past often can't be changed. Execution is
|
compatibility. That means bad choices from the past often can't be changed
|
||||||
quite slow, every line is parsed every time it is executed.
|
and compability with Vi restricts possible solutions. Execution is quite
|
||||||
|
slow, each line is parsed every time it is executed.
|
||||||
|
|
||||||
The main goal of Vim9 script is to drastically improve performance. An
|
The main goal of Vim9 script is to drastically improve performance. This is
|
||||||
increase in execution speed of 10 to 100 times can be expected. A secondary
|
accomplished by compiling commands into instructions that can be efficiently
|
||||||
goal is to avoid Vim-specific constructs and get closer to commonly used
|
executed. An increase in execution speed of 10 to 100 times can be expected.
|
||||||
programming languages, such as JavaScript, TypeScript and Java.
|
|
||||||
|
A secondary goal is to avoid Vim-specific constructs and get closer to
|
||||||
|
commonly used programming languages, such as JavaScript, TypeScript and Java.
|
||||||
|
|
||||||
The performance improvements can only be achieved by not being 100% backwards
|
The performance improvements can only be achieved by not being 100% backwards
|
||||||
compatible. For example, in a function the arguments are not available in the
|
compatible. For example, in a function the arguments are not available in the
|
||||||
"a:" dictionary, as creating that dictionary adds quite a lot of overhead.
|
"a:" dictionary, because creating that dictionary adds quite a lot of
|
||||||
Other differences are more subtle, such as how errors are handled.
|
overhead. Other differences are more subtle, such as how errors are handled.
|
||||||
|
|
||||||
The Vim9 script syntax and semantics are used in:
|
The Vim9 script syntax and semantics are used in:
|
||||||
- a function defined with the `:def` command
|
- a function defined with the `:def` command
|
||||||
- a script file where the first command is `vim9script`
|
- a script file where the first command is `vim9script`
|
||||||
|
|
||||||
When using `:function` in a Vim9 script file the legacy syntax is used.
|
When using `:function` in a Vim9 script file the legacy syntax is used.
|
||||||
However, this is discouraged.
|
However, this can be confusing and is therefore discouraged.
|
||||||
|
|
||||||
Vim9 script and legacy Vim script can be mixed. There is no need to rewrite
|
Vim9 script and legacy Vim script can be mixed. There is no requirement to
|
||||||
old scripts, they keep working as before.
|
rewrite old scripts, they keep working as before.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@ -62,9 +65,9 @@ Comments starting with # ~
|
|||||||
|
|
||||||
In Vim script comments normally start with double quote. That can also be the
|
In Vim script comments normally start with double quote. That can also be the
|
||||||
start of a string, thus in many places it cannot be used. In Vim9 script a
|
start of a string, thus in many places it cannot be used. In Vim9 script a
|
||||||
comment can also start with #. Normally this is a command to list text with
|
comment can also start with #. In Vi 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
|
||||||
|
|
||||||
To improve readability there must be a space between the command and the #
|
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
|
that starts a comment. Note that #{ is the start of a dictionary, therefore
|
||||||
@ -73,40 +76,59 @@ it cannot start a comment.
|
|||||||
|
|
||||||
Vim9 functions ~
|
Vim9 functions ~
|
||||||
|
|
||||||
|
A function defined with `:def` is compiled. Execution is many times faster,
|
||||||
|
often 10x to 100x times.
|
||||||
|
|
||||||
|
Many errors are already found when compiling, before the function is called.
|
||||||
|
The syntax is strict, to enforce code that is easy to read and understand.
|
||||||
|
|
||||||
`:def` has no extra arguments like `:function` does: "range", "abort", "dict"
|
`:def` has no extra arguments like `:function` does: "range", "abort", "dict"
|
||||||
or "closure". A `:def` function always aborts on an error, does not get a
|
or "closure". A `:def` function always aborts on an error, does not get a
|
||||||
range passed and cannot be a "dict" function.
|
range passed and cannot be a "dict" function.
|
||||||
|
|
||||||
In the function body:
|
The argument types and return type need to be specified. The "any" type can
|
||||||
- Arguments are accessed by name, without "a:".
|
be used, type checking will then be done at runtime, like with legacy
|
||||||
- There is no "a:" dictionary or "a:000" list. Variable arguments are defined
|
functions.
|
||||||
with a name and have a list type: >
|
|
||||||
def MyFunc(...itemlist: list<type>)
|
Arguments are accessed by name, without "a:". There is no "a:" dictionary or
|
||||||
|
"a:000" list.
|
||||||
|
|
||||||
|
Variable arguments are defined as the last argument, with a name and have a
|
||||||
|
list type, similar to Typescript. For example, a list of numbers: >
|
||||||
|
def MyFunc(...itemlist: list<number>)
|
||||||
for item in itemlist
|
for item in itemlist
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
Functions are script-local by default ~
|
Functions and variables are script-local by default ~
|
||||||
|
|
||||||
When using `:function` or `:def` to specify a new function at the script level
|
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
|
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.
|
prefixed. Using the "s:" prefix is optional.
|
||||||
|
|
||||||
|
To define or use a global function or variable the "g:" prefix must be used.
|
||||||
|
|
||||||
When using `:function` or `:def` to specify a new function inside a function,
|
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
|
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:"
|
script-local function inside a function. It is possible to define a global
|
||||||
prefix must be used.
|
function, using the "g:" prefix.
|
||||||
|
|
||||||
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
||||||
search for the function in this order:
|
search for the function in this order:
|
||||||
- Local to the current function scope.
|
- Local to the current scope and outer scopes up to the function scope.
|
||||||
- Local to the current script file.
|
- Local to the current script file.
|
||||||
- Imported functions, see `:import`.
|
- Imported functions, see `:import`.
|
||||||
- Global.
|
In all cases the function must be defined before used. To make a call cycle a
|
||||||
|
global function needs to be used. (TODO: can we fix this?)
|
||||||
|
|
||||||
|
The result is that functions and variables without a namespace can always be
|
||||||
|
found in the script, either defined there or imported. Global functions and
|
||||||
|
variables could be defined anywhere (good luck finding where!).
|
||||||
|
|
||||||
Global functions can be defined and deleted at nearly any time. In Vim9
|
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
|
script script-local functions are defined once when the script is sourced and
|
||||||
cannot be deleted.
|
cannot be deleted. Except that when the same script is sourced again all
|
||||||
|
existing script-local functions and variables are deleted.
|
||||||
|
|
||||||
|
|
||||||
Variable declarations with :let and :const ~
|
Variable declarations with :let and :const ~
|
||||||
@ -156,12 +178,12 @@ and without `:let`, because there is no rule about where they are declared.
|
|||||||
Variables cannot shadow previously defined variables.
|
Variables cannot shadow previously defined variables.
|
||||||
Variables may shadow Ex commands, rename the variable if needed.
|
Variables may shadow Ex commands, rename the variable if needed.
|
||||||
|
|
||||||
Global variables must be prefixed with "g:", also at the script level.
|
Global variables and user defined functions must be prefixed with "g:", also
|
||||||
However, global user defined functions are used without "g:". >
|
at the script level. >
|
||||||
vim9script
|
vim9script
|
||||||
let script_local = 'text'
|
let script_local = 'text'
|
||||||
let g:global = 'value'
|
let g:global = 'value'
|
||||||
let Funcref = ThatFunction
|
let Funcref = g:ThatFunction
|
||||||
|
|
||||||
Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
|
Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
|
||||||
used to repeat a `:substitute` command.
|
used to repeat a `:substitute` command.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: man
|
" Language: man
|
||||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||||
" Last Change: 2020 Apr 13
|
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||||
|
" Last Change: 2020 Apr 30
|
||||||
|
|
||||||
" To make the ":Man" command available before editing a manual page, source
|
" To make the ":Man" command available before editing a manual page, source
|
||||||
" this script from your startup vimrc file.
|
" this script from your startup vimrc file.
|
||||||
@ -205,7 +206,7 @@ func <SID>GetPage(cmdmods, ...)
|
|||||||
endif
|
endif
|
||||||
let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
|
let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
|
||||||
let env_cmd .= ' GROFF_NO_SGR=1'
|
let env_cmd .= ' GROFF_NO_SGR=1'
|
||||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
|
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' 2>/dev/null | col -b'
|
||||||
silent exec "r !" . man_cmd
|
silent exec "r !" . man_cmd
|
||||||
|
|
||||||
if unsetwidth
|
if unsetwidth
|
||||||
|
@ -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: 2020 Feb 02
|
" Last Change: 2020 Apr 27
|
||||||
" 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', 'eoan', 'focal', 'devel'
|
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
|
||||||
\ ]
|
\ ]
|
||||||
let s:unsupported = [
|
let s:unsupported = [
|
||||||
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||||
|
@ -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: 2020 Feb 02
|
" Last Change: 2020 Apr 27
|
||||||
" 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', 'eoan', 'focal', 'devel'
|
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
|
||||||
\ ]
|
\ ]
|
||||||
let s:unsupported = [
|
let s:unsupported = [
|
||||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Lex
|
" Language: Lex and Flex
|
||||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||||
" Last Change: Aug 31, 2016
|
" Contributor: Robert A. van Engelen <engelen@acm.org>
|
||||||
" Version: 17
|
" Last Change: Apr 24, 2020
|
||||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#SYNTAX_LEX
|
" Version: 18
|
||||||
"
|
|
||||||
" Option:
|
|
||||||
" lex_uses_cpp : if this variable exists, then C++ is loaded rather than C
|
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Read the C/C++ syntax to start with
|
" Read the C++ syntax to start with
|
||||||
let s:Cpath= fnameescape(expand("<sfile>:p:h").(exists("g:lex_uses_cpp")? "/cpp.vim" : "/c.vim"))
|
let s:Cpath= fnameescape(expand("<sfile>:p:h")."/cpp.vim")
|
||||||
if !filereadable(s:Cpath)
|
if !filereadable(s:Cpath)
|
||||||
for s:Cpath in split(globpath(&rtp,(exists("g:lex_uses_cpp")? "syntax/cpp.vim" : "syntax/c.vim")),"\n")
|
for s:Cpath in split(globpath(&rtp,"syntax/cpp.vim"),"\n")
|
||||||
if filereadable(fnameescape(s:Cpath))
|
if filereadable(fnameescape(s:Cpath))
|
||||||
let s:Cpath= fnameescape(s:Cpath)
|
let s:Cpath= fnameescape(s:Cpath)
|
||||||
break
|
break
|
||||||
@ -29,115 +26,163 @@ exe "syn include @lexCcode ".s:Cpath
|
|||||||
" --- Lex stuff ---
|
" --- Lex stuff ---
|
||||||
" --- ========= ---
|
" --- ========= ---
|
||||||
|
|
||||||
" Options Section
|
" Definitions
|
||||||
syn match lexOptions '^%\s*option\>.*$' contains=lexPatString
|
" %%
|
||||||
|
" Rules
|
||||||
|
" %%
|
||||||
|
" User Code
|
||||||
|
"
|
||||||
|
" --- ======= ---
|
||||||
|
" --- Example ---
|
||||||
|
" --- ======= ---
|
||||||
|
"
|
||||||
|
" // this is a valid lex file
|
||||||
|
" // indented initial code block
|
||||||
|
" #include <stdlib.h>
|
||||||
|
" %{
|
||||||
|
" // initial code block
|
||||||
|
" #include <stdio.h>
|
||||||
|
" const char *sep = "";
|
||||||
|
" %}
|
||||||
|
" %option outfile="scanner.c" noyywrap nodefault
|
||||||
|
" %x COMMENT
|
||||||
|
" id [A-Za-z_][A-Za-z0-9_]*
|
||||||
|
" %%
|
||||||
|
" // indented initial action code block
|
||||||
|
" printf("BEGIN");
|
||||||
|
" {id} printf("%s%s", sep, yytext); sep = "";
|
||||||
|
" . |
|
||||||
|
" \n { sep = "\n"; }
|
||||||
|
" "/*" { BEGIN COMMENT; }
|
||||||
|
" "//".* { }
|
||||||
|
" <COMMENT>{
|
||||||
|
" "*/" { BEGIN INITIAL; }
|
||||||
|
" .|\n
|
||||||
|
" }
|
||||||
|
" <*><<EOF>> { // end of file
|
||||||
|
" printf("\nEND\n");
|
||||||
|
" yyterminate();
|
||||||
|
" }
|
||||||
|
" %%
|
||||||
|
" void scan()
|
||||||
|
" {
|
||||||
|
" while (yylex())
|
||||||
|
" continue;
|
||||||
|
" }
|
||||||
|
" /* main program */
|
||||||
|
" int main()
|
||||||
|
" {
|
||||||
|
" scan();
|
||||||
|
" }
|
||||||
|
|
||||||
" Abbreviations Section
|
" Definitions Section with initial code blocks, abbreviations, options, states
|
||||||
if has("folding")
|
if has("folding")
|
||||||
syn region lexAbbrvBlock fold start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
|
syn region lexAbbrvBlock fold start="^\S" end="^\ze%%" skipnl nextgroup=lexPatBlock contains=lexOptions,lexAbbrv,lexInitialCodeBlock,lexInclude,lexAbbrvComment,lexStartState
|
||||||
else
|
else
|
||||||
syn region lexAbbrvBlock start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
|
syn region lexAbbrvBlock start="^\S" end="^\ze%%" skipnl nextgroup=lexPatBlock contains=lexOptions,lexAbbrv,lexInitialCodeBlock,lexInclude,lexAbbrvComment,lexStartState
|
||||||
endif
|
endif
|
||||||
syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp
|
syn match lexOptions "^%\a\+\(\s.*\|[^{]*\)$" contains=lexOptionsEq,lexPatString,lexSlashQuote,lexBrace,lexSlashBrace
|
||||||
syn match lexAbbrv "^%[sx]" contained
|
syn match lexOptionsEq "=" skipwhite contained
|
||||||
syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude
|
syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvPat
|
||||||
|
syn match lexAbbrvPat "\s\S.*$"lc=1 contained contains=lexPatAbbrv,lexPatString,lexSlashQuote,lexBrace,lexSlashBrace nextgroup=lexAbbrv,lexInclude
|
||||||
|
syn match lexStartState "^%\(xs\?\|s\)\(t\(a\(t\(e\?\)\?\)\?\)\?\)\?\(\s\+\I\i*\)\+\s*$" contained contains=lexStartStateCmd
|
||||||
|
syn match lexStartStateCmd '^%\(xs\?\|s\)\(t\(a\(t\(e\?\)\?\)\?\)\?\)\?' contained
|
||||||
if has("folding")
|
if has("folding")
|
||||||
syn region lexInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=@lexCcode
|
syn region lexInitialCodeBlock fold start="^\s\+" end="^\S"me=e-1 contains=@lexCcode
|
||||||
syn region lexAbbrvComment fold start="^\s\+/\*" end="\*/" contains=@Spell
|
syn region lexInclude fold matchgroup=lexSep start="^%\a*{" end="^%\?}" contained contains=@lexCcode,lexCFunctions
|
||||||
syn region lexAbbrvComment fold start="\%^/\*" end="\*/" contains=@Spell
|
syn region lexAbbrvComment fold start="^\s*//" end="$" contains=@Spell
|
||||||
syn region lexStartState fold matchgroup=lexAbbrv start="^%\a\+" end="$" contained
|
syn region lexAbbrvComment fold start="^\s*/\*" end="\*/" contains=@Spell
|
||||||
else
|
else
|
||||||
syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=@lexCcode
|
syn region lexInitialCodeBlock start="^\s\+" end="^\S"me=e-1 contains=@lexCcode
|
||||||
syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell
|
syn region lexInclude matchgroup=lexSep start="^%\a*{" end="^%\?}" contained contains=@lexCcode,lexCFunctions
|
||||||
syn region lexAbbrvComment start="\%^/\*" end="\*/" contains=@Spell
|
syn region lexAbbrvComment start="^\s*//" end="$" contains=@Spell
|
||||||
syn region lexStartState matchgroup=lexAbbrv start="^%\a\+" end="$" contained
|
syn region lexAbbrvComment start="^\s*/\*" end="\*/" contains=@Spell
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"%% : Patterns {Actions}
|
" Rules Section with patterns and actions
|
||||||
if has("folding")
|
if has("folding")
|
||||||
syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%\ze%$" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
|
syn region lexPatBlock fold matchgroup=Todo start="^%%" matchgroup=Todo end="^\ze%%" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatSep,lexPatInclude
|
||||||
syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
|
syn region lexPat fold start="\S" skip="\\\\\|\\\s" end="\ze\(\s*$\|\s\+\(\h\|{\W\|{$\|[-+*]\|//\|/\*\)\)" skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPatEnd contains=lexPatTag,lexPatString,lexSlashQuote,lexPatAbbrv,lexBrace,lexSlashBrace
|
||||||
syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
|
syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="^%}" contained contains=@lexCcode
|
||||||
syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained
|
syn region lexBrace fold matchgroup=Character start="\[" skip="\\.\|\[:\a\+:\]\|\[\.\a\+\.\]\|\[=.=\]" end="\]" contained
|
||||||
syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
||||||
else
|
else
|
||||||
syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude
|
syn region lexPatBlock matchgroup=Todo start="^%%" matchgroup=Todo end="^\ze%%" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatSep,lexPatInclude
|
||||||
syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace
|
syn region lexPat start="\S" skip="\\\\\|\\\s" end="\ze\(\s*$\|\s\+\(\h\|{\W\|{$\|[-+*]\|//\|/\*\)\)" skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPatEnd contains=lexPatTag,lexPatString,lexSlashQuote,lexPatAbbrv,lexBrace,lexSlashBrace
|
||||||
syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode
|
syn region lexPatInclude matchgroup=lexSep start="^%{" end="^%}" contained contains=@lexCcode
|
||||||
syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained
|
syn region lexBrace matchgroup=Character start="\[" skip="\\.\|\[:\a\+:\]\|\[\.\a\+\.\]\|\[=.=\]" end="\]" contained
|
||||||
syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained
|
||||||
endif
|
endif
|
||||||
syn match lexPatTag "^<\I\i*\(,\I\i*\)*>" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
|
syn match lexPatAbbrv "{\I\i*}"hs=s+1,he=e-1 contained
|
||||||
syn match lexPatTagZone "^<\I\i*\(,\I\i*\)*>\s\+\ze{" contained nextgroup=lexPatTagZoneStart
|
syn match lexPatTag "^<\^\?\(\I\i*\|\*\)\(,\^\?\(\I\i*\|\*\)\)*>" contained nextgroup=lexPat,lexMorePat,lexPatSep,lexPatEnd
|
||||||
syn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
|
syn match lexPatTagZone "^<\^\?\(\I\i*\|\*\)\(,\^\?\(\I\i*\|\*\)\)*>\s*{$"me=e-1 contained nextgroup=lexPatTagZoneStart
|
||||||
|
|
||||||
" Lex Patterns
|
|
||||||
syn region lexPattern start='[^ \t{}]' end="$" contained contains=lexPatRange
|
|
||||||
syn region lexPatRange matchgroup=Delimiter start='\[' skip='\\\\\|\\.' end='\]' contains=lexEscape
|
|
||||||
syn match lexEscape '\%(\\\\\)*\\.' contained
|
|
||||||
|
|
||||||
if has("folding")
|
if has("folding")
|
||||||
syn region lexPatTagZoneStart matchgroup=lexPatTag fold start='{' end='}' contained contains=lexPat,lexPatComment
|
syn region lexPatTagZoneStart fold matchgroup=lexPatTag start='{$' end='^}' skipnl skipwhite contained contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatSep,lexPatInclude
|
||||||
syn region lexPatComment start="\s\+/\*" end="\*/" fold skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
syn region lexPatComment fold start="//" end="$" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
||||||
|
syn region lexPatComment fold start="/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
||||||
else
|
else
|
||||||
syn region lexPatTagZoneStart matchgroup=lexPatTag start='{' end='}' contained contains=lexPat,lexPatComment
|
syn region lexPatTagZoneStart matchgroup=lexPatTag start='{' end='^}' skipnl skipwhitecontained contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatSep,lexPatInclude
|
||||||
syn region lexPatComment start="\s\+/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
syn region lexPatComment start="//" end="$" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
||||||
|
syn region lexPatComment start="/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
|
||||||
endif
|
endif
|
||||||
syn match lexPatCodeLine "[^{\[].*" contained contains=@lexCcode
|
syn match lexPatEnd "\s*$" skipnl contained
|
||||||
syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment
|
syn match lexPatCodeLine "[^{\[].*" contained contains=@lexCcode,lexCFunctions
|
||||||
syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine
|
syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment
|
||||||
|
syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine
|
||||||
syn match lexSlashQuote +\(\\\\\)*\\"+ contained
|
syn match lexSlashQuote +\(\\\\\)*\\"+ contained
|
||||||
|
syn match lexSlashBrace +\(\\\\\)*\\\[+ contained
|
||||||
if has("folding")
|
if has("folding")
|
||||||
syn region lexPatCode matchgroup=Delimiter start="{" end="}" fold skipnl contained contains=@lexCcode,lexCFunctions
|
syn region lexPatCode fold matchgroup=Delimiter start="{" end="}" skipnl contained contains=@lexCcode,lexCFunctions
|
||||||
else
|
else
|
||||||
syn region lexPatCode matchgroup=Delimiter start="{" end="}" skipnl contained contains=@lexCcode,lexCFunctions
|
syn region lexPatCode matchgroup=Delimiter start="{" end="}" skipnl contained contains=@lexCcode,lexCFunctions
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Lex "functions" which may appear in C/C++ code blocks
|
" User Code Section with final code block
|
||||||
syn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytext
|
syn region lexFinalCodeBlock matchgroup=Todo start="^%%" end="\%$" contained contains=@lexCcode
|
||||||
syn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap
|
|
||||||
|
|
||||||
" %%
|
" Lex macros which may appear in C/C++ code blocks
|
||||||
" lexAbbrevBlock
|
syn keyword lexCFunctions BEGIN ECHO REJECT yytext YYText yyleng YYLeng yymore yyless yywrap yylook
|
||||||
" %%
|
syn keyword lexCFunctions yyrestart yyterminate yylineno yycolumno yyin yyout
|
||||||
" lexPatBlock
|
syn keyword lexCFunctions input unput output winput wunput woutput
|
||||||
" %%
|
syn keyword lexCFunctions yyinput yyunput yyoutput yywinput yywunput yywoutput
|
||||||
" lexFinalCodeBlock
|
|
||||||
syn region lexFinalCodeBlock matchgroup=Todo start="%$"me=e-1 end="\%$" contained contains=@lexCcode
|
|
||||||
|
|
||||||
" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude lex* groups
|
" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude lex* groups
|
||||||
syn cluster cParenGroup add=lex.*
|
syn cluster cParenGroup add=lex.*
|
||||||
syn cluster cDefineGroup add=lex.*
|
syn cluster cDefineGroup add=lex.*
|
||||||
syn cluster cPreProcGroup add=lex.*
|
syn cluster cPreProcGroup add=lex.*
|
||||||
syn cluster cMultiGroup add=lex.*
|
syn cluster cMultiGroup add=lex.*
|
||||||
|
|
||||||
" Synchronization
|
" Synchronization
|
||||||
syn sync clear
|
syn sync clear
|
||||||
syn sync minlines=500
|
syn sync minlines=500
|
||||||
syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]"
|
syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]"
|
||||||
syn sync match lexSyncPat groupthere lexPatBlock "^<$"
|
syn sync match lexSyncPat groupthere lexPatBlock "^<$"
|
||||||
syn sync match lexSyncPat groupthere lexPatBlock "^%%$"
|
syn sync match lexSyncPat groupthere lexPatBlock "^%%"
|
||||||
|
|
||||||
" The default highlighting.
|
" The default highlighting.
|
||||||
if !exists("skip_lex_syntax_inits")
|
if !exists("skip_lex_syntax_inits")
|
||||||
hi def link lexAbbrvComment lexPatComment
|
hi def link lexAbbrvComment lexPatComment
|
||||||
hi def link lexAbbrvRegExp Macro
|
hi def link lexAbbrvPat lexPat
|
||||||
hi def link lexAbbrv SpecialChar
|
hi def link lexAbbrv Special
|
||||||
hi def link lexBrace lexPat
|
hi def link lexBrace lexPat
|
||||||
hi def link lexCFunctions Function
|
hi def link lexCFunctions PreProc
|
||||||
hi def link lexCstruct cStructure
|
hi def link lexMorePat Special
|
||||||
hi def link lexMorePat SpecialChar
|
hi def link lexOptions PreProc
|
||||||
hi def link lexOptions PreProc
|
hi def link lexOptionsEq Operator
|
||||||
hi def link lexPatComment Comment
|
hi def link lexPatComment Comment
|
||||||
hi def link lexPat Function
|
hi def link lexPat Function
|
||||||
hi def link lexPatString Function
|
hi def link lexPatString lexPat
|
||||||
hi def link lexPatTag Special
|
hi def link lexPatAbbrv Special
|
||||||
|
hi def link lexPatTag Statement
|
||||||
hi def link lexPatTagZone lexPatTag
|
hi def link lexPatTagZone lexPatTag
|
||||||
hi def link lexSep Delimiter
|
hi def link lexSep Delimiter
|
||||||
hi def link lexSlashQuote lexPat
|
hi def link lexSlashQuote lexPat
|
||||||
hi def link lexStartState Statement
|
hi def link lexSlashBrace lexPat
|
||||||
|
hi def link lexStartState lexPatTag
|
||||||
|
hi def link lexStartStateCmd Special
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "lex"
|
let b:current_syntax = "lex"
|
||||||
|
|
||||||
" vim:ts=10
|
" vim:ts=8
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Man page
|
" Language: Man page
|
||||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||||
|
" Previous 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: 2020 Apr 15
|
" Last Change: 2020 Apr 30
|
||||||
|
|
||||||
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
|
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
|
||||||
" * manSubHeading
|
" * manSubHeading
|
||||||
@ -19,9 +20,6 @@ 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 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]$"
|
||||||
@ -29,6 +27,9 @@ syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
|
|||||||
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
|
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
|
||||||
" syn match manHistory "^[a-z].*last change.*$"
|
" syn match manHistory "^[a-z].*last change.*$"
|
||||||
|
|
||||||
|
syn match manHeader '\%1l.*'
|
||||||
|
exe 'syn match manFooter ''\%' . line('$') . 'l.*'''
|
||||||
|
|
||||||
if getline(1) =~ '^[a-zA-Z_]\+([23])'
|
if getline(1) =~ '^[a-zA-Z_]\+([23])'
|
||||||
syntax include @cCode <sfile>:p:h/c.vim
|
syntax include @cCode <sfile>:p:h/c.vim
|
||||||
syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained
|
syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained
|
||||||
|
Reference in New Issue
Block a user