vim-patch:2e693a88b24d

Update runtime files.
2e693a88b2
This commit is contained in:
Jan Edmund Lazo
2021-04-23 19:23:58 -04:00
parent ecb48e7f8a
commit f0bf853f41
10 changed files with 98 additions and 41 deletions

View File

@@ -2506,7 +2506,7 @@ 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}])
none move window {nr} to split of {target} Number move window {nr} to split of {target}
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}
@@ -2585,6 +2585,9 @@ append({lnum}, {text}) *append()*
appendbufline({expr}, {lnum}, {text}) *appendbufline()* appendbufline({expr}, {lnum}, {text}) *appendbufline()*
Like |append()| but append the text in buffer {expr}. Like |append()| but append the text in buffer {expr}.
This function works only for loaded buffers. First call
|bufload()| if needed.
For the use of {expr}, see |bufname()|. For the use of {expr}, see |bufname()|.
{lnum} is used like with |append()|. Note that using |line()| {lnum} is used like with |append()|. Note that using |line()|
@@ -3335,6 +3338,9 @@ deletebufline({expr}, {first}[, {last}]) *deletebufline()*
If {last} is omitted then delete line {first} only. If {last} is omitted then delete line {first} only.
On success 0 is returned, on failure 1 is returned. On success 0 is returned, on failure 1 is returned.
This function works only for loaded buffers. First call
|bufload()| if needed.
For the use of {expr}, see |bufname()| above. For the use of {expr}, see |bufname()| above.
{first} and {last} are used like with |setline()|. Note that {first} and {last} are used like with |setline()|. Note that
@@ -7369,13 +7375,24 @@ serverstop({address}) *serverstop()*
address returned by |serverlist()|. address returned by |serverlist()|.
setbufline({expr}, {lnum}, {text}) *setbufline()* setbufline({expr}, {lnum}, {text}) *setbufline()*
Set line {lnum} to {text} in buffer {expr}. To insert Set line {lnum} to {text} in buffer {expr}. This works like
lines use |append()|. |setline()| for the specified buffer.
This function works only for loaded buffers. First call
|bufload()| if needed.
To insert lines use |appendbufline()|.
Any text properties in {lnum} are cleared.
{text} can be a string to set one line, or a list of strings
to set multiple lines. If the list extends below the last
line then those lines are added.
For the use of {expr}, see |bufname()| above. For the use of {expr}, see |bufname()| above.
{lnum} is used like with |setline()|. {lnum} is used like with |setline()|.
This works like |setline()| for the specified buffer. When {lnum} is just below the last line the {text} will be
added below the last line.
On success 0 is returned, on failure 1 is returned. On success 0 is returned, on failure 1 is returned.
If {expr} is not a valid buffer or {lnum} is not valid, an If {expr} is not a valid buffer or {lnum} is not valid, an
@@ -7458,7 +7475,7 @@ setline({lnum}, {text}) *setline()*
{lnum} is used like with |getline()|. {lnum} is used like with |getline()|.
When {lnum} is just below the last line the {text} will be When {lnum} is just below the last line the {text} will be
added as a new line. added below the last line.
If this succeeds, 0 is returned. If this fails (most likely If this succeeds, 0 is returned. If this fails (most likely
because {lnum} is invalid) 1 is returned. because {lnum} is invalid) 1 is returned.
@@ -9911,20 +9928,21 @@ This does NOT work: >
*:let=<<* *:let-heredoc* *:let=<<* *:let-heredoc*
*E990* *E991* *E172* *E221* *E990* *E991* *E172* *E221*
:let {var-name} =<< [trim] {marker} :let {var-name} =<< [trim] {endmarker}
text... text...
text... text...
{marker} {endmarker}
Set internal variable {var-name} to a List containing Set internal variable {var-name} to a List containing
the lines of text bounded by the string {marker}. the lines of text bounded by the string {endmarker}.
{marker} cannot start with a lower case character. {endmarker} cannot start with a lower case character.
The last line should end only with the {marker} string The last line should end only with the {endmarker}
without any other character. Watch out for white string without any other character. Watch out for
space after {marker}! white space after {endmarker}!
Without "trim" any white space characters in the lines Without "trim" any white space characters in the lines
of text are preserved. If "trim" is specified before of text are preserved. If "trim" is specified before
{marker}, then indentation is stripped so you can do: > {endmarker}, then indentation is stripped so you can
do: >
let text =<< trim END let text =<< trim END
if ok if ok
echo 'done' echo 'done'
@@ -9938,13 +9956,21 @@ text...
non-empty text line is stripped from the input lines. non-empty text line is stripped from the input lines.
All leading indentation exactly matching the leading All leading indentation exactly matching the leading
indentation before `let` is stripped from the line indentation before `let` is stripped from the line
containing {marker}. Note that the difference between containing {endmarker}. Note that the difference
space and tab matters here. between space and tab matters here.
If {var-name} didn't exist yet, it is created. If {var-name} didn't exist yet, it is created.
Cannot be followed by another command, but can be Cannot be followed by another command, but can be
followed by a comment. followed by a comment.
To avoid line continuation to be applied, consider
adding 'C' to 'cpoptions': >
set cpo+=C
let var =<< END
\ leading backslash
END
set cpo-=C
<
Examples: > Examples: >
let var1 =<< END let var1 =<< END
Sample text 1 Sample text 1

View File

@@ -22,14 +22,15 @@ See |provider-perl| for more information.
:[range]perl << [endmarker] :[range]perl << [endmarker]
{script} {script}
{endmarker} {endmarker}
Execute perl script {script}. Useful for including Execute perl script {script}.
perl code in Vim scripts. Requires perl, see The {endmarker} after {script} must NOT be preceded by
|script-here|. any white space.
The {endmarker} below the {script} must NOT be preceded by any white space. If [endmarker] is omitted, it defaults to a dot '.'
like for the |:append| and |:insert| commands.
If [endmarker] is omitted from after the "<<", a dot '.' must be used after Useful for including perl code in Vim scripts.
{script}, like for the |:append| and |:insert| commands. Requires perl, see |script-here|.
Example: > Example: >
function! MyVimMethod() function! MyVimMethod()

View File

@@ -19,14 +19,14 @@ downloading Ruby there.
:rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: > :rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
:ruby print "Hello" :ruby print "Hello"
:rub[y] << [endpattern] :rub[y] << [endmarker]
{script} {script}
{endpattern} {endmarker}
Execute Ruby script {script}. Execute Ruby script {script}.
The {endpattern} after {script} must NOT be preceded The {endmarker} after {script} must NOT be preceded by
by any white space. any white space.
If [endpattern] is omitted, it defaults to a dot '.' If [endmarker] is omitted, it defaults to a dot '.'
like for the |:append| and |:insert| commands. like for the |:append| and |:insert| commands.
This form of the |:ruby| command is mainly useful for This form of the |:ruby| command is mainly useful for

View File

@@ -951,10 +951,12 @@ Function call arguments will indent 1 extra level. For two-space indentation: >
------------- -------------
*PHP_IndentFunctionDeclarationParameters* *PHP_IndentFunctionDeclarationParameters*
Extra indentation levels to add to arguments in multi-line function definitions. > Extra indentation levels to add to arguments in multi-line function
definitions. >
let g:PHP_IndentFunctionDeclarationParameters = 1 let g:PHP_IndentFunctionDeclarationParameters = 1
Function arguments in declarations will indent 1 extra level. For two-space indentation: > Function arguments in declarations will indent 1 extra level. For two-space
indentation: >
function call_the_thing( function call_the_thing(
$with_this, $with_this,

View File

@@ -1392,7 +1392,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeslash'* *'csl'* *'completeslash'* *'csl'*
'completeslash' 'csl' string (default: "") 'completeslash' 'csl' string (default: "")
local to buffer local to buffer
{not in Vi} {only for MS-Windows} {only for MS-Windows}
When this option is set it overrules 'shellslash' for completion: When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path - When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or completion in insert mode. This is useful when editing HTML tag, or

View File

@@ -37,8 +37,8 @@ If the VIM environment variable is not set, Vim will try to find
the path in another way (see |$VIMRUNTIME|). Usually this works just the path in another way (see |$VIMRUNTIME|). Usually this works just
fine. If it doesn't, try setting the VIM environment variable to the fine. If it doesn't, try setting the VIM environment variable to the
directory where the Vim stuff is located. For example, if your syntax files directory where the Vim stuff is located. For example, if your syntax files
are in the "/usr/vim/vim50/syntax" directory, set $VIMRUNTIME to are in the "/usr/vim/vim81/syntax" directory, set $VIMRUNTIME to
"/usr/vim/vim50". You must do this in the shell, before starting Vim. "/usr/vim/vim81". You must do this in the shell, before starting Vim.
This command also sources the |menu.vim| script when the GUI is running or This command also sources the |menu.vim| script when the GUI is running or
will start soon. See |'go-M'| about avoiding that. will start soon. See |'go-M'| about avoiding that.

View File

@@ -0,0 +1,14 @@
# vim: set ft=yaml sw=2 et :
# START_INDENT
map1:
sub1:
- list item
map2:
- another list
# END_INDENT
# START_INDENT
map: &anchor
map: val
# END_INDENT

View File

@@ -0,0 +1,14 @@
# vim: set ft=yaml sw=2 et :
# START_INDENT
map1:
sub1:
- list item
map2:
- another list
# END_INDENT
# START_INDENT
map: &anchor
map: val
# END_INDENT

View File

@@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: YAML " Language: YAML
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com> " Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Change: 2017 Jun 13 " Last Change: 2019 Sep 28
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists('b:did_indent') if exists('b:did_indent')
@@ -29,7 +29,7 @@ function s:FindPrevLessIndentedLine(lnum, ...)
let curindent = a:0 ? a:1 : indent(a:lnum) let curindent = a:0 ? a:1 : indent(a:lnum)
while prevlnum while prevlnum
\&& indent(prevlnum) >= curindent \&& indent(prevlnum) >= curindent
\&& getline(prevlnum) =~# '^\s*#' \&& getline(prevlnum) !~# '^\s*#'
let prevlnum = prevnonblank(prevlnum-1) let prevlnum = prevnonblank(prevlnum-1)
endwhile endwhile
return prevlnum return prevlnum

View File

@@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: BIND configuration file " Language: BIND configuration file
" Maintainer: Nick Hibma <nick@van-laarhoven.org> " Maintainer: Nick Hibma <nick@van-laarhoven.org>
" Last Change: 2007-01-30 " Last Change: 2019 Oct 08
" Filenames: named.conf, rndc.conf " Filenames: named.conf, rndc.conf
" Location: http://www.van-laarhoven.org/vim/syntax/named.vim " Location: http://www.van-laarhoven.org/vim/syntax/named.vim
" "
@@ -54,7 +54,7 @@ syn match namedIntIdent contained /"\=\k\+"\=/ nextgroup=namedIntSection skipwhi
syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword
" --- IntSection: section that does not contain other sections " --- IntSection: section that does not contain other sections
syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError,namedComment
" --- IntKeyword: keywords contained within `{ ... }' sections only " --- IntKeyword: keywords contained within `{ ... }' sections only
" + these keywords are contained within `key' and `acl' sections " + these keywords are contained within `key' and `acl' sections