mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:partial:016188fd8a30 (#18890)
Update runtime files.
016188fd8a
omit changes from doc/builtin.txt (needs 8.2.1536, 8.2.4981)
skip user manual rewrite for Vim9script
This commit is contained in:
parent
9e442c17ee
commit
1324e7f79e
@ -582,6 +582,8 @@ acos({expr}) *acos()*
|
|||||||
|Float| in the range of [0, pi].
|
|Float| in the range of [0, pi].
|
||||||
{expr} must evaluate to a |Float| or a |Number| in the range
|
{expr} must evaluate to a |Float| or a |Number| in the range
|
||||||
[-1, 1].
|
[-1, 1].
|
||||||
|
Returns NaN if {expr} is outside the range [-1, 1]. Returns
|
||||||
|
0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo acos(0)
|
:echo acos(0)
|
||||||
< 1.570796 >
|
< 1.570796 >
|
||||||
@ -600,6 +602,7 @@ add({object}, {expr}) *add()*
|
|||||||
item. Use |extend()| to concatenate |Lists|.
|
item. Use |extend()| to concatenate |Lists|.
|
||||||
When {object} is a |Blob| then {expr} must be a number.
|
When {object} is a |Blob| then {expr} must be a number.
|
||||||
Use |insert()| to add an item at another position.
|
Use |insert()| to add an item at another position.
|
||||||
|
Returns 1 if {object} is not a |List| or a |Blob|.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
mylist->add(val1)->add(val2)
|
mylist->add(val1)->add(val2)
|
||||||
@ -697,11 +700,17 @@ argv([{nr} [, {winid}]])
|
|||||||
The {winid} argument specifies the window ID, see |argc()|.
|
The {winid} argument specifies the window ID, see |argc()|.
|
||||||
For the Vim command line arguments see |v:argv|.
|
For the Vim command line arguments see |v:argv|.
|
||||||
|
|
||||||
|
Returns an empty string if {nr}th argument is not present in
|
||||||
|
the argument list. Returns an empty List if the {winid}
|
||||||
|
argument is invalid.
|
||||||
|
|
||||||
asin({expr}) *asin()*
|
asin({expr}) *asin()*
|
||||||
Return the arc sine of {expr} measured in radians, as a |Float|
|
Return the arc sine of {expr} measured in radians, as a |Float|
|
||||||
in the range of [-pi/2, pi/2].
|
in the range of [-pi/2, pi/2].
|
||||||
{expr} must evaluate to a |Float| or a |Number| in the range
|
{expr} must evaluate to a |Float| or a |Number| in the range
|
||||||
[-1, 1].
|
[-1, 1].
|
||||||
|
Returns NaN if {expr} is outside the range [-1, 1]. Returns
|
||||||
|
0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo asin(0.8)
|
:echo asin(0.8)
|
||||||
< 0.927295 >
|
< 0.927295 >
|
||||||
@ -719,6 +728,7 @@ atan({expr}) *atan()*
|
|||||||
Return the principal value of the arc tangent of {expr}, in
|
Return the principal value of the arc tangent of {expr}, in
|
||||||
the range [-pi/2, +pi/2] radians, as a |Float|.
|
the range [-pi/2, +pi/2] radians, as a |Float|.
|
||||||
{expr} must evaluate to a |Float| or a |Number|.
|
{expr} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo atan(100)
|
:echo atan(100)
|
||||||
< 1.560797 >
|
< 1.560797 >
|
||||||
@ -732,6 +742,8 @@ atan2({expr1}, {expr2}) *atan2()*
|
|||||||
Return the arc tangent of {expr1} / {expr2}, measured in
|
Return the arc tangent of {expr1} / {expr2}, measured in
|
||||||
radians, as a |Float| in the range [-pi, pi].
|
radians, as a |Float| in the range [-pi, pi].
|
||||||
{expr1} and {expr2} must evaluate to a |Float| or a |Number|.
|
{expr1} and {expr2} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr1} or {expr2} is not a |Float| or a
|
||||||
|
|Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo atan2(-1, 1)
|
:echo atan2(-1, 1)
|
||||||
< -0.785398 >
|
< -0.785398 >
|
||||||
@ -777,7 +789,8 @@ bufadd({name}) *bufadd()*
|
|||||||
let bufnr = bufadd('someName')
|
let bufnr = bufadd('someName')
|
||||||
call bufload(bufnr)
|
call bufload(bufnr)
|
||||||
call setbufline(bufnr, 1, ['some', 'text'])
|
call setbufline(bufnr, 1, ['some', 'text'])
|
||||||
< Can also be used as a |method|: >
|
< Returns 0 on error.
|
||||||
|
Can also be used as a |method|: >
|
||||||
let bufnr = 'somename'->bufadd()
|
let bufnr = 'somename'->bufadd()
|
||||||
|
|
||||||
bufexists({buf}) *bufexists()*
|
bufexists({buf}) *bufexists()*
|
||||||
@ -919,6 +932,8 @@ byte2line({byte}) *byte2line()*
|
|||||||
one.
|
one.
|
||||||
Also see |line2byte()|, |go| and |:goto|.
|
Also see |line2byte()|, |go| and |:goto|.
|
||||||
|
|
||||||
|
Returns -1 if the {byte} value is invalid.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetOffset()->byte2line()
|
GetOffset()->byte2line()
|
||||||
|
|
||||||
@ -985,6 +1000,8 @@ ceil({expr}) *ceil()*
|
|||||||
echo ceil(4.0)
|
echo ceil(4.0)
|
||||||
< 4.0
|
< 4.0
|
||||||
|
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
Compute()->ceil()
|
Compute()->ceil()
|
||||||
|
|
||||||
@ -995,6 +1012,7 @@ changenr() *changenr()*
|
|||||||
When a change was made it is the number of that change. After
|
When a change was made it is the number of that change. After
|
||||||
redo it is the number of the redone change. After undo it is
|
redo it is the number of the redone change. After undo it is
|
||||||
one less than the number of the undone change.
|
one less than the number of the undone change.
|
||||||
|
Returns 0 if the undo list is empty.
|
||||||
|
|
||||||
chanclose({id} [, {stream}]) *chanclose()*
|
chanclose({id} [, {stream}]) *chanclose()*
|
||||||
Close a channel or a specific stream associated with it.
|
Close a channel or a specific stream associated with it.
|
||||||
@ -1038,6 +1056,8 @@ char2nr({string} [, {utf8}]) *char2nr()*
|
|||||||
A combining character is a separate character.
|
A combining character is a separate character.
|
||||||
|nr2char()| does the opposite.
|
|nr2char()| does the opposite.
|
||||||
|
|
||||||
|
Returns 0 if {string} is not a |String|.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetChar()->char2nr()
|
GetChar()->char2nr()
|
||||||
<
|
<
|
||||||
@ -1146,7 +1166,7 @@ col({expr}) The result is a Number, which is the byte index of the column
|
|||||||
col("$") length of cursor line plus one
|
col("$") length of cursor line plus one
|
||||||
col("'t") column of mark t
|
col("'t") column of mark t
|
||||||
col("'" .. markname) column of mark markname
|
col("'" .. markname) column of mark markname
|
||||||
< The first column is 1. 0 is returned for an error.
|
< The first column is 1. Returns 0 if {expr} is invalid.
|
||||||
For an uppercase mark the column may actually be in another
|
For an uppercase mark the column may actually be in another
|
||||||
buffer.
|
buffer.
|
||||||
For the cursor position, when 'virtualedit' is active, the
|
For the cursor position, when 'virtualedit' is active, the
|
||||||
@ -1264,6 +1284,8 @@ complete_info([{what}]) *complete_info()*
|
|||||||
|pum_getpos()|. It's also available in |v:event| during the
|
|pum_getpos()|. It's also available in |v:event| during the
|
||||||
|CompleteChanged| event.
|
|CompleteChanged| event.
|
||||||
|
|
||||||
|
Returns an empty |Dictionary| on error.
|
||||||
|
|
||||||
Examples: >
|
Examples: >
|
||||||
" Get all items
|
" Get all items
|
||||||
call complete_info()
|
call complete_info()
|
||||||
@ -1346,6 +1368,7 @@ copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't
|
|||||||
cos({expr}) *cos()*
|
cos({expr}) *cos()*
|
||||||
Return the cosine of {expr}, measured in radians, as a |Float|.
|
Return the cosine of {expr}, measured in radians, as a |Float|.
|
||||||
{expr} must evaluate to a |Float| or a |Number|.
|
{expr} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo cos(100)
|
:echo cos(100)
|
||||||
< 0.862319 >
|
< 0.862319 >
|
||||||
@ -1359,6 +1382,7 @@ cosh({expr}) *cosh()*
|
|||||||
Return the hyperbolic cosine of {expr} as a |Float| in the range
|
Return the hyperbolic cosine of {expr} as a |Float| in the range
|
||||||
[1, inf].
|
[1, inf].
|
||||||
{expr} must evaluate to a |Float| or a |Number|.
|
{expr} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo cosh(0.5)
|
:echo cosh(0.5)
|
||||||
< 1.127626 >
|
< 1.127626 >
|
||||||
@ -1914,6 +1938,7 @@ exp({expr}) *exp()*
|
|||||||
Return the exponential of {expr} as a |Float| in the range
|
Return the exponential of {expr} as a |Float| in the range
|
||||||
[0, inf].
|
[0, inf].
|
||||||
{expr} must evaluate to a |Float| or a |Number|.
|
{expr} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo exp(2)
|
:echo exp(2)
|
||||||
< 7.389056 >
|
< 7.389056 >
|
||||||
@ -1929,6 +1954,9 @@ debugbreak({pid}) *debugbreak()*
|
|||||||
processes is undefined. See |terminal-debugger|.
|
processes is undefined. See |terminal-debugger|.
|
||||||
{Sends a SIGINT to a process {pid} other than MS-Windows}
|
{Sends a SIGINT to a process {pid} other than MS-Windows}
|
||||||
|
|
||||||
|
Returns |TRUE| if successfully interrupted the program.
|
||||||
|
Otherwise returns |FALSE|.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetPid()->debugbreak()
|
GetPid()->debugbreak()
|
||||||
|
|
||||||
@ -2065,7 +2093,7 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
|||||||
{expr2} remains unchanged.
|
{expr2} remains unchanged.
|
||||||
When {expr1} is locked and {expr2} is not empty the operation
|
When {expr1} is locked and {expr2} is not empty the operation
|
||||||
fails.
|
fails.
|
||||||
Returns {expr1}.
|
Returns {expr1}. Returns 0 on error.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
mylist->extend(otherlist)
|
mylist->extend(otherlist)
|
||||||
@ -2210,6 +2238,8 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
|
|||||||
{name} in {path} instead of the first one.
|
{name} in {path} instead of the first one.
|
||||||
When {count} is negative return all the matches in a |List|.
|
When {count} is negative return all the matches in a |List|.
|
||||||
|
|
||||||
|
Returns an empty string if the directory is not found.
|
||||||
|
|
||||||
This is quite similar to the ex-command `:find`.
|
This is quite similar to the ex-command `:find`.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
@ -2252,6 +2282,7 @@ float2nr({expr}) *float2nr()*
|
|||||||
Convert {expr} to a Number by omitting the part after the
|
Convert {expr} to a Number by omitting the part after the
|
||||||
decimal point.
|
decimal point.
|
||||||
{expr} must evaluate to a |Float| or a Number.
|
{expr} must evaluate to a |Float| or a Number.
|
||||||
|
Returns 0 if {expr} is not a |Float| or a |Number|.
|
||||||
When the value of {expr} is out of range for a |Number| the
|
When the value of {expr} is out of range for a |Number| the
|
||||||
result is truncated to 0x7fffffff or -0x7fffffff (or when
|
result is truncated to 0x7fffffff or -0x7fffffff (or when
|
||||||
64-bit Number support is enabled, 0x7fffffffffffffff or
|
64-bit Number support is enabled, 0x7fffffffffffffff or
|
||||||
@ -2276,6 +2307,7 @@ floor({expr}) *floor()*
|
|||||||
Return the largest integral value less than or equal to
|
Return the largest integral value less than or equal to
|
||||||
{expr} as a |Float| (round down).
|
{expr} as a |Float| (round down).
|
||||||
{expr} must evaluate to a |Float| or a |Number|.
|
{expr} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr} is not a |Float| or a |Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
echo floor(1.856)
|
echo floor(1.856)
|
||||||
< 1.0 >
|
< 1.0 >
|
||||||
@ -2295,6 +2327,8 @@ fmod({expr1}, {expr2}) *fmod()*
|
|||||||
the magnitude of {expr2}. If {expr2} is zero, the value
|
the magnitude of {expr2}. If {expr2} is zero, the value
|
||||||
returned is zero. The value returned is a |Float|.
|
returned is zero. The value returned is a |Float|.
|
||||||
{expr1} and {expr2} must evaluate to a |Float| or a |Number|.
|
{expr1} and {expr2} must evaluate to a |Float| or a |Number|.
|
||||||
|
Returns 0.0 if {expr1} or {expr2} is not a |Float| or a
|
||||||
|
|Number|.
|
||||||
Examples: >
|
Examples: >
|
||||||
:echo fmod(12.33, 1.22)
|
:echo fmod(12.33, 1.22)
|
||||||
< 0.13 >
|
< 0.13 >
|
||||||
@ -2313,6 +2347,7 @@ fnameescape({string}) *fnameescape()*
|
|||||||
appears in a filename, it depends on the value of 'isfname'.
|
appears in a filename, it depends on the value of 'isfname'.
|
||||||
A leading '+' and '>' is also escaped (special after |:edit|
|
A leading '+' and '>' is also escaped (special after |:edit|
|
||||||
and |:write|). And a "-" by itself (special after |:cd|).
|
and |:write|). And a "-" by itself (special after |:cd|).
|
||||||
|
Returns an empty string on error.
|
||||||
Example: >
|
Example: >
|
||||||
:let fname = '+some str%nge|name'
|
:let fname = '+some str%nge|name'
|
||||||
:exe "edit " .. fnameescape(fname)
|
:exe "edit " .. fnameescape(fname)
|
||||||
@ -2330,7 +2365,8 @@ fnamemodify({fname}, {mods}) *fnamemodify()*
|
|||||||
:echo fnamemodify("main.c", ":p:h")
|
:echo fnamemodify("main.c", ":p:h")
|
||||||
< results in: >
|
< results in: >
|
||||||
/home/mool/vim/vim/src
|
/home/mool/vim/vim/src
|
||||||
< If {mods} is empty then {fname} is returned.
|
< If {mods} is empty or an unsupported modifier is used then
|
||||||
|
{fname} is returned.
|
||||||
Note: Environment variables don't work in {fname}, use
|
Note: Environment variables don't work in {fname}, use
|
||||||
|expand()| first then.
|
|expand()| first then.
|
||||||
|
|
||||||
@ -2387,6 +2423,7 @@ foldtext() Returns a String, to be displayed for a closed fold. This is
|
|||||||
When used to draw the actual foldtext, the rest of the line
|
When used to draw the actual foldtext, the rest of the line
|
||||||
will be filled with the fold char from the 'fillchars'
|
will be filled with the fold char from the 'fillchars'
|
||||||
setting.
|
setting.
|
||||||
|
Returns an empty string when there is no fold.
|
||||||
|
|
||||||
foldtextresult({lnum}) *foldtextresult()*
|
foldtextresult({lnum}) *foldtextresult()*
|
||||||
Returns the text that is displayed for the closed fold at line
|
Returns the text that is displayed for the closed fold at line
|
||||||
@ -2426,6 +2463,7 @@ funcref({name} [, {arglist}] [, {dict}])
|
|||||||
been loaded (to avoid mistakenly loading the autoload script
|
been loaded (to avoid mistakenly loading the autoload script
|
||||||
when only intending to use the function name, use |function()|
|
when only intending to use the function name, use |function()|
|
||||||
instead). {name} cannot be a builtin function.
|
instead). {name} cannot be a builtin function.
|
||||||
|
Returns 0 on error.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetFuncname()->funcref([arg])
|
GetFuncname()->funcref([arg])
|
||||||
@ -2480,6 +2518,8 @@ function({name} [, {arglist}] [, {dict}])
|
|||||||
< Invokes the function as with: >
|
< Invokes the function as with: >
|
||||||
call context.Callback('one', 500)
|
call context.Callback('one', 500)
|
||||||
<
|
<
|
||||||
|
Returns 0 on error.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
GetFuncname()->function([arg])
|
GetFuncname()->function([arg])
|
||||||
|
|
||||||
@ -2527,6 +2567,7 @@ get({func}, {what})
|
|||||||
"func" The function
|
"func" The function
|
||||||
"dict" The dictionary
|
"dict" The dictionary
|
||||||
"args" The list with arguments
|
"args" The list with arguments
|
||||||
|
Returns zero on error.
|
||||||
|
|
||||||
*getbufinfo()*
|
*getbufinfo()*
|
||||||
getbufinfo([{buf}])
|
getbufinfo([{buf}])
|
||||||
@ -2747,7 +2788,7 @@ getcharmod() *getcharmod()*
|
|||||||
128 command (Macintosh only)
|
128 command (Macintosh only)
|
||||||
Only the modifiers that have not been included in the
|
Only the modifiers that have not been included in the
|
||||||
character itself are obtained. Thus Shift-a results in "A"
|
character itself are obtained. Thus Shift-a results in "A"
|
||||||
without a modifier.
|
without a modifier. Returns 0 if no modifiers are used.
|
||||||
|
|
||||||
*getcharpos()*
|
*getcharpos()*
|
||||||
getcharpos({expr})
|
getcharpos({expr})
|
||||||
@ -3067,7 +3108,8 @@ getjumplist([{winnr} [, {tabnr}]]) *getjumplist()*
|
|||||||
With {winnr} only use this window in the current tab page.
|
With {winnr} only use this window in the current tab page.
|
||||||
{winnr} can also be a |window-ID|.
|
{winnr} can also be a |window-ID|.
|
||||||
With {winnr} and {tabnr} use the window in the specified tab
|
With {winnr} and {tabnr} use the window in the specified tab
|
||||||
page.
|
page. If {winnr} or {tabnr} is invalid, an empty list is
|
||||||
|
returned.
|
||||||
|
|
||||||
The returned list contains two entries: a list with the jump
|
The returned list contains two entries: a list with the jump
|
||||||
locations and the last used jump position number in the list.
|
locations and the last used jump position number in the list.
|
||||||
@ -3148,7 +3190,8 @@ getmarklist([{buf}]) *getmarklist()*
|
|||||||
|
|
||||||
If the optional {buf} argument is specified, returns the
|
If the optional {buf} argument is specified, returns the
|
||||||
local marks defined in buffer {buf}. For the use of {buf},
|
local marks defined in buffer {buf}. For the use of {buf},
|
||||||
see |bufname()|.
|
see |bufname()|. If {buf} is invalid, an empty list is
|
||||||
|
returned.
|
||||||
|
|
||||||
Each item in the returned List is a |Dict| with the following:
|
Each item in the returned List is a |Dict| with the following:
|
||||||
mark name of the mark prefixed by "'"
|
mark name of the mark prefixed by "'"
|
||||||
@ -3170,7 +3213,8 @@ getmatches([{win}]) *getmatches()*
|
|||||||
as |setmatches()| can restore a list of matches saved by
|
as |setmatches()| can restore a list of matches saved by
|
||||||
|getmatches()|.
|
|getmatches()|.
|
||||||
If {win} is specified, use the window with this number or
|
If {win} is specified, use the window with this number or
|
||||||
window ID instead of the current window.
|
window ID instead of the current window. If {win} is invalid,
|
||||||
|
`0` is returned.
|
||||||
Example: >
|
Example: >
|
||||||
:echo getmatches()
|
:echo getmatches()
|
||||||
< [{'group': 'MyGroup1', 'pattern': 'TODO',
|
< [{'group': 'MyGroup1', 'pattern': 'TODO',
|
||||||
@ -3242,6 +3286,7 @@ getpos({expr}) Get the position for String {expr}. For possible values of
|
|||||||
use |getcharpos()|.
|
use |getcharpos()|.
|
||||||
The column number can be very large, e.g. 2147483647, in which
|
The column number can be very large, e.g. 2147483647, in which
|
||||||
case it means "after the end of the line".
|
case it means "after the end of the line".
|
||||||
|
If {expr} is invalid, returns a list with all zeros.
|
||||||
This can be used to save and restore the position of a mark: >
|
This can be used to save and restore the position of a mark: >
|
||||||
let save_a_mark = getpos("'a")
|
let save_a_mark = getpos("'a")
|
||||||
...
|
...
|
||||||
@ -7415,8 +7460,8 @@ sqrt({expr}) *sqrt()*
|
|||||||
:echo sqrt(100)
|
:echo sqrt(100)
|
||||||
< 10.0 >
|
< 10.0 >
|
||||||
:echo sqrt(-4.01)
|
:echo sqrt(-4.01)
|
||||||
< nan
|
< str2float('nan')
|
||||||
"nan" may be different, it depends on system libraries.
|
NaN may be different, it depends on system libraries.
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
Compute()->sqrt()
|
Compute()->sqrt()
|
||||||
@ -8797,6 +8842,7 @@ winnr([{arg}]) The result is a Number, which is the number of the current
|
|||||||
current window (where |CTRL-W_l| goes to).
|
current window (where |CTRL-W_l| goes to).
|
||||||
The number can be used with |CTRL-W_w| and ":wincmd w"
|
The number can be used with |CTRL-W_w| and ":wincmd w"
|
||||||
|:wincmd|.
|
|:wincmd|.
|
||||||
|
When {arg} is invalid an error is given and zero is returned.
|
||||||
Also see |tabpagewinnr()| and |win_getid()|.
|
Also see |tabpagewinnr()| and |win_getid()|.
|
||||||
Examples: >
|
Examples: >
|
||||||
let window_count = winnr('$')
|
let window_count = winnr('$')
|
||||||
|
@ -1596,7 +1596,7 @@ the same (the text may change, e.g., it may be translated).
|
|||||||
|
|
||||||
When the ":read" command causes another error, the pattern "E484:" will not
|
When the ":read" command causes another error, the pattern "E484:" will not
|
||||||
match in it. Thus this exception will not be caught and result in the usual
|
match in it. Thus this exception will not be caught and result in the usual
|
||||||
error message.
|
error message and execution is aborted.
|
||||||
|
|
||||||
You might be tempted to do this: >
|
You might be tempted to do this: >
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
||||||
" Maintainer: Quentin Hibon (github user hiqua)
|
" Maintainer: Quentin Hibon (github user hiqua)
|
||||||
" Version: 0.4
|
" Version: 0.4
|
||||||
" Last Change: 2022 May 05
|
" Last Change: 2022 Jun 05
|
||||||
|
|
||||||
" References:
|
" References:
|
||||||
" http://i3wm.org/docs/userguide.html#configuring
|
" http://i3wm.org/docs/userguide.html#configuring
|
||||||
@ -17,9 +17,6 @@ endif
|
|||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
" Error
|
|
||||||
syn match i3ConfigError /.*/
|
|
||||||
|
|
||||||
" Todo
|
" Todo
|
||||||
syn keyword i3ConfigTodo TODO FIXME XXX contained
|
syn keyword i3ConfigTodo TODO FIXME XXX contained
|
||||||
|
|
||||||
@ -180,13 +177,12 @@ syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3C
|
|||||||
|
|
||||||
" Group mode/bar
|
" Group mode/bar
|
||||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_min_width workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_min_width workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
syn region i3ConfigBlock start=+^\s*[^#]*s\?{$+ end=+^\s*[^#]*}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||||
|
|
||||||
" Line continuation
|
" Line continuation
|
||||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||||
|
|
||||||
" Define the highlighting.
|
" Define the highlighting.
|
||||||
hi def link i3ConfigError Error
|
|
||||||
hi def link i3ConfigTodo Todo
|
hi def link i3ConfigTodo Todo
|
||||||
hi def link i3ConfigComment Comment
|
hi def link i3ConfigComment Comment
|
||||||
hi def link i3ConfigFontContent Type
|
hi def link i3ConfigFontContent Type
|
||||||
|
@ -12,6 +12,9 @@ setl nodiff
|
|||||||
silent g/^#, c-format\n#/.d
|
silent g/^#, c-format\n#/.d
|
||||||
silent g/^#\..*\n#/.d
|
silent g/^#\..*\n#/.d
|
||||||
|
|
||||||
|
" c-format comments have no effect, the check.vim scripts checks it.
|
||||||
|
silent g/^#, c-format$/d
|
||||||
|
|
||||||
silent g/^#[:~] /d
|
silent g/^#[:~] /d
|
||||||
silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
|
silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
|
||||||
silent g/^msgstr"/s//msgstr "/
|
silent g/^msgstr"/s//msgstr "/
|
||||||
|
Loading…
Reference in New Issue
Block a user