updated for version 7.0031
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 04
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2774,6 +2774,7 @@ string({expr}) Return {expr} converted to a String.
|
||||
String identical
|
||||
Number decimal representation
|
||||
Funcref name of the function
|
||||
List "[item, item]" form
|
||||
|
||||
*strlen()*
|
||||
strlen({expr}) The result is a Number, which is the length of the String
|
||||
@ -3619,29 +3620,69 @@ This would call the function "my_func_whizz(parameter)".
|
||||
as long as {expr1} evaluates to non-zero.
|
||||
When an error is detected from a command inside the
|
||||
loop, execution continues after the "endwhile".
|
||||
|
||||
Example: >
|
||||
:let lnum = 1
|
||||
:while lnum <= line("$")
|
||||
:call FixLine(lnum)
|
||||
:let lnum = lnum + 1
|
||||
:endwhile
|
||||
<
|
||||
NOTE: The ":append" and ":insert" commands don't work
|
||||
properly inside a ":while" loop.
|
||||
properly inside a :while" and ":for" loop.
|
||||
|
||||
:for {var} in {list} *:for*
|
||||
:endfo[r] *:endfo* *:endfor*
|
||||
Repeat the commands between ":for" and ":endfor" for
|
||||
each item in {list}. {var} is set to the value of the
|
||||
item.
|
||||
When an error is detected from a command inside the
|
||||
loop, execution continues after the "endfor".
|
||||
A copy of {list} is made, so that it cannot change
|
||||
while executing the commands. Example (an inefficient
|
||||
way to make a list empty): >
|
||||
:for a in mylist
|
||||
:call remove(mylist, 0)
|
||||
:endfor
|
||||
< Note that the type of each list item should be
|
||||
identical to avoid errors for the type of {var}
|
||||
changing. Unlet the variable at the end of the loop
|
||||
to allow multiple item types.
|
||||
|
||||
:for {var} in {string}
|
||||
:endfo[r] Like ":for" above, but use each character in {string}
|
||||
as a list item.
|
||||
Composing characters are used as separate characters.
|
||||
A Number is first converted to a String.
|
||||
|
||||
:for [{var1}, {var2}, ...] in {listlist}
|
||||
:endfo[r]
|
||||
Like ":for" above, but each item in {listlist} must be
|
||||
a list, of which each item is assigned to {var1},
|
||||
{var2}, etc. Example: >
|
||||
:for [lnum, col] in [[1, 3], [2, 5], [3, 8]]
|
||||
:echo getline(lnum)[col]
|
||||
:endfor
|
||||
<
|
||||
*:continue* *:con* *E586*
|
||||
:con[tinue] When used inside a ":while", jumps back to the
|
||||
":while". If it is used after a |:try| inside the
|
||||
":while" but before the matching |:finally| (if
|
||||
present), the commands following the ":finally" up to
|
||||
the matching |:endtry| are executed first. This
|
||||
process applies to all nested ":try"s inside the
|
||||
":while". The outermost ":endtry" then jumps back to
|
||||
the ":while".
|
||||
:con[tinue] When used inside a ":while" or ":for" loop, jumps back
|
||||
to the start of the loop.
|
||||
If it is used after a |:try| inside the loop but
|
||||
before the matching |:finally| (if present), the
|
||||
commands following the ":finally" up to the matching
|
||||
|:endtry| are executed first. This process applies to
|
||||
all nested ":try"s inside the loop. The outermost
|
||||
":endtry" then jumps back to the start of the loop.
|
||||
|
||||
*:break* *:brea* *E587*
|
||||
:brea[k] When used inside a ":while", skips to the command
|
||||
after the matching ":endwhile". If it is used after
|
||||
a |:try| inside the ":while" but before the matching
|
||||
|:finally| (if present), the commands following the
|
||||
":finally" up to the matching |:endtry| are executed
|
||||
first. This process applies to all nested ":try"s
|
||||
inside the ":while". The outermost ":endtry" then
|
||||
jumps to the command after the ":endwhile".
|
||||
:brea[k] When used inside a ":while" or ":for" loop, skips to
|
||||
the command after the matching ":endwhile" or
|
||||
":endfor".
|
||||
If it is used after a |:try| inside the loop but
|
||||
before the matching |:finally| (if present), the
|
||||
commands following the ":finally" up to the matching
|
||||
|:endtry| are executed first. This process applies to
|
||||
all nested ":try"s inside the loop. The outermost
|
||||
":endtry" then jumps to the command after the loop.
|
||||
|
||||
:try *:try* *:endt* *:endtry* *E600* *E601* *E602*
|
||||
:endt[ry] Change the error handling for the commands between
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2004 Dec 24
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -5019,7 +5019,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
folds manually created folds, opened/closed folds and local
|
||||
fold options
|
||||
globals global variables that start with an uppercase letter
|
||||
and contain at least one lowercase letter.
|
||||
and contain at least one lowercase letter. Only
|
||||
String and Number types are stored.
|
||||
help the help window
|
||||
localoptions options and mappings local to a window or buffer (not
|
||||
global values for local options)
|
||||
@ -6410,7 +6411,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
! When included, save and restore global variables that start
|
||||
with an uppercase letter, and don't contain a lowercase
|
||||
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
|
||||
and "_K_L_M" are not.
|
||||
and "_K_L_M" are not. Only String and Number types are
|
||||
stored.
|
||||
" Maximum number of lines saved for each register. Old name of
|
||||
the '<' item, with the disadvantage that you need to put a
|
||||
backslash before the ", otherwise it will be recognized as the
|
||||
|
||||
@ -1883,6 +1883,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:emenu gui.txt /*:emenu*
|
||||
:en eval.txt /*:en*
|
||||
:endf eval.txt /*:endf*
|
||||
:endfo eval.txt /*:endfo*
|
||||
:endfor eval.txt /*:endfor*
|
||||
:endfunction eval.txt /*:endfunction*
|
||||
:endif eval.txt /*:endif*
|
||||
:endt eval.txt /*:endt*
|
||||
@ -1934,6 +1936,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:folddoopen fold.txt /*:folddoopen*
|
||||
:foldo fold.txt /*:foldo*
|
||||
:foldopen fold.txt /*:foldopen*
|
||||
:for eval.txt /*:for*
|
||||
:fu eval.txt /*:fu*
|
||||
:function eval.txt /*:function*
|
||||
:g repeat.txt /*:g*
|
||||
@ -2039,6 +2042,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:let-option eval.txt /*:let-option*
|
||||
:let-register eval.txt /*:let-register*
|
||||
:let-star eval.txt /*:let-star*
|
||||
:let-unpack eval.txt /*:let-unpack*
|
||||
:list various.txt /*:list*
|
||||
:lm map.txt /*:lm*
|
||||
:lmap map.txt /*:lmap*
|
||||
@ -5298,6 +5302,7 @@ linewise motion.txt /*linewise*
|
||||
linewise-register change.txt /*linewise-register*
|
||||
linewise-visual visual.txt /*linewise-visual*
|
||||
lispindent() eval.txt /*lispindent()*
|
||||
list-index eval.txt /*list-index*
|
||||
list-repeat windows.txt /*list-repeat*
|
||||
lite-syntax syntax.txt /*lite-syntax*
|
||||
lite.vim syntax.txt /*lite.vim*
|
||||
@ -5871,6 +5876,7 @@ remote_foreground() eval.txt /*remote_foreground()*
|
||||
remote_peek() eval.txt /*remote_peek()*
|
||||
remote_read() eval.txt /*remote_read()*
|
||||
remote_send() eval.txt /*remote_send()*
|
||||
remove() eval.txt /*remove()*
|
||||
remove-filetype filetype.txt /*remove-filetype*
|
||||
remove-option-flags options.txt /*remove-option-flags*
|
||||
rename() eval.txt /*rename()*
|
||||
|
||||
Reference in New Issue
Block a user