mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
parent
ecb48e7f8a
commit
f0bf853f41
@ -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_screenpos({nr}) List get screen position of window {nr}
|
||||
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}
|
||||
wincol() Number window column of the cursor
|
||||
winheight({nr}) Number height of window {nr}
|
||||
@ -2585,6 +2585,9 @@ append({lnum}, {text}) *append()*
|
||||
appendbufline({expr}, {lnum}, {text}) *appendbufline()*
|
||||
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()|.
|
||||
|
||||
{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.
|
||||
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.
|
||||
|
||||
{first} and {last} are used like with |setline()|. Note that
|
||||
@ -7369,13 +7375,24 @@ serverstop({address}) *serverstop()*
|
||||
address returned by |serverlist()|.
|
||||
|
||||
setbufline({expr}, {lnum}, {text}) *setbufline()*
|
||||
Set line {lnum} to {text} in buffer {expr}. To insert
|
||||
lines use |append()|.
|
||||
Set line {lnum} to {text} in buffer {expr}. This works like
|
||||
|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.
|
||||
|
||||
{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.
|
||||
|
||||
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()|.
|
||||
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
|
||||
because {lnum} is invalid) 1 is returned.
|
||||
@ -9911,20 +9928,21 @@ This does NOT work: >
|
||||
|
||||
*:let=<<* *:let-heredoc*
|
||||
*E990* *E991* *E172* *E221*
|
||||
:let {var-name} =<< [trim] {marker}
|
||||
:let {var-name} =<< [trim] {endmarker}
|
||||
text...
|
||||
text...
|
||||
{marker}
|
||||
{endmarker}
|
||||
Set internal variable {var-name} to a List containing
|
||||
the lines of text bounded by the string {marker}.
|
||||
{marker} cannot start with a lower case character.
|
||||
The last line should end only with the {marker} string
|
||||
without any other character. Watch out for white
|
||||
space after {marker}!
|
||||
the lines of text bounded by the string {endmarker}.
|
||||
{endmarker} cannot start with a lower case character.
|
||||
The last line should end only with the {endmarker}
|
||||
string without any other character. Watch out for
|
||||
white space after {endmarker}!
|
||||
|
||||
Without "trim" any white space characters in the lines
|
||||
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
|
||||
if ok
|
||||
echo 'done'
|
||||
@ -9938,23 +9956,31 @@ text...
|
||||
non-empty text line is stripped from the input lines.
|
||||
All leading indentation exactly matching the leading
|
||||
indentation before `let` is stripped from the line
|
||||
containing {marker}. Note that the difference between
|
||||
space and tab matters here.
|
||||
containing {endmarker}. Note that the difference
|
||||
between space and tab matters here.
|
||||
|
||||
If {var-name} didn't exist yet, it is created.
|
||||
Cannot be followed by another command, but can be
|
||||
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: >
|
||||
let var1 =<< END
|
||||
Sample text 1
|
||||
Sample text 2
|
||||
Sample text 3
|
||||
END
|
||||
Sample text 1
|
||||
Sample text 2
|
||||
Sample text 3
|
||||
END
|
||||
|
||||
let data =<< trim DATA
|
||||
1 2 3 4
|
||||
5 6 7 8
|
||||
1 2 3 4
|
||||
5 6 7 8
|
||||
DATA
|
||||
<
|
||||
*E121*
|
||||
|
@ -22,14 +22,15 @@ See |provider-perl| for more information.
|
||||
:[range]perl << [endmarker]
|
||||
{script}
|
||||
{endmarker}
|
||||
Execute perl script {script}. Useful for including
|
||||
perl code in Vim scripts. Requires perl, see
|
||||
|script-here|.
|
||||
Execute perl script {script}.
|
||||
The {endmarker} after {script} must NOT be preceded by
|
||||
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
|
||||
{script}, like for the |:append| and |:insert| commands.
|
||||
Useful for including perl code in Vim scripts.
|
||||
Requires perl, see |script-here|.
|
||||
|
||||
Example: >
|
||||
function! MyVimMethod()
|
||||
|
@ -19,14 +19,14 @@ downloading Ruby there.
|
||||
:rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
|
||||
:ruby print "Hello"
|
||||
|
||||
:rub[y] << [endpattern]
|
||||
:rub[y] << [endmarker]
|
||||
{script}
|
||||
{endpattern}
|
||||
{endmarker}
|
||||
Execute Ruby script {script}.
|
||||
The {endpattern} after {script} must NOT be preceded
|
||||
by any white space.
|
||||
The {endmarker} after {script} must NOT be preceded by
|
||||
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.
|
||||
|
||||
This form of the |:ruby| command is mainly useful for
|
||||
|
@ -951,10 +951,12 @@ Function call arguments will indent 1 extra level. For two-space indentation: >
|
||||
-------------
|
||||
|
||||
*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
|
||||
|
||||
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(
|
||||
$with_this,
|
||||
|
@ -1392,7 +1392,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'completeslash'* *'csl'*
|
||||
'completeslash' 'csl' string (default: "")
|
||||
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 to "slash", a forward slash is used for path
|
||||
completion in insert mode. This is useful when editing HTML tag, or
|
||||
|
@ -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
|
||||
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
|
||||
are in the "/usr/vim/vim50/syntax" directory, set $VIMRUNTIME to
|
||||
"/usr/vim/vim50". You must do this in the shell, before starting Vim.
|
||||
are in the "/usr/vim/vim81/syntax" directory, set $VIMRUNTIME to
|
||||
"/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
|
||||
will start soon. See |'go-M'| about avoiding that.
|
||||
|
||||
|
14
runtime/indent/testdir/yaml.in
Normal file
14
runtime/indent/testdir/yaml.in
Normal 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
|
14
runtime/indent/testdir/yaml.ok
Normal file
14
runtime/indent/testdir/yaml.ok
Normal 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
|
@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: YAML
|
||||
" 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.
|
||||
if exists('b:did_indent')
|
||||
@ -29,7 +29,7 @@ function s:FindPrevLessIndentedLine(lnum, ...)
|
||||
let curindent = a:0 ? a:1 : indent(a:lnum)
|
||||
while prevlnum
|
||||
\&& indent(prevlnum) >= curindent
|
||||
\&& getline(prevlnum) =~# '^\s*#'
|
||||
\&& getline(prevlnum) !~# '^\s*#'
|
||||
let prevlnum = prevnonblank(prevlnum-1)
|
||||
endwhile
|
||||
return prevlnum
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: BIND configuration file
|
||||
" Maintainer: Nick Hibma <nick@van-laarhoven.org>
|
||||
" Last Change: 2007-01-30
|
||||
" Last Change: 2019 Oct 08
|
||||
" Filenames: named.conf, rndc.conf
|
||||
" 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
|
||||
|
||||
" --- 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
|
||||
" + these keywords are contained within `key' and `acl' sections
|
||||
|
Loading…
Reference in New Issue
Block a user