1- *eval.txt* For Vim version 7.4. Last change: 2016 Mar 14
1+ *eval.txt* For Vim version 7.4. Last change: 2016 Mar 15
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -350,10 +350,6 @@ This works like: >
350350 : let index = index + 1
351351 :endwhile
352352
353- Note that all items in the list should be of the same type, otherwise this
354- results in error | E706 | . To avoid this | :unlet | the variable at the end of
355- the loop.
356-
357353 If all you want to do is modify each item in the list then the | map() |
358354function will be a simpler method than a for loop.
359355
@@ -2133,9 +2129,12 @@ tabpagewinnr( {tabarg}[, {arg}])
21332129 Number number of current window in tab page
21342130taglist( {expr} ) List list of tags matching {expr}
21352131tagfiles() List tags files used
2136- tempname() String name for a temporary file
21372132tan( {expr} ) Float tangent of {expr}
21382133tanh( {expr} ) Float hyperbolic tangent of {expr}
2134+ tempname() String name for a temporary file
2135+ timer_start( {time} , {callback} [, {options} ])
2136+ Number create a timer
2137+ timer_stop( {timer} ) none stop a timer
21392138tolower( {expr} ) String the String {expr} switched to lowercase
21402139toupper( {expr} ) String the String {expr} switched to uppercase
21412140tr( {src} , {fromstr} , {tostr} ) String translate chars of {src} in {fromstr}
@@ -3572,8 +3571,15 @@ foreground() Move the Vim window to the foreground. Useful when sent from
35723571 *function()* *E700* *E922* *E923*
35733572function({name} [, {arglist} ] [, {dict} ])
35743573 Return a | Funcref | variable that refers to function {name} .
3575- {name} can be a user defined function or an internal function.
3576-
3574+ {name} can be the name of a user defined function or an
3575+ internal function.
3576+
3577+ {name} can also be a Funcref, also a partial. When it is a
3578+ partial the dict stored in it will be used and the {dict}
3579+ argument is not allowed. E.g.: >
3580+ let FuncWithArg = function(dict.Func, [arg])
3581+ let Broken = function(dict.Func, [arg], dict)
3582+ <
35773583 When {arglist} or {dict} is present this creates a partial.
35783584 That mans the argument list and/or the dictionary is stored in
35793585 the Funcref and will be used when the Funcref is called.
@@ -3598,6 +3604,10 @@ function({name} [, {arglist}] [, {dict}])
35983604 let Func = function('Callback', context)
35993605 ...
36003606 call Func() " will echo: called for example
3607+ < The use of function() is not needed when there are no extra
3608+ arguments, these two are equivalent: >
3609+ let Func = function('Callback', context)
3610+ let Func = context.Callback
36013611
36023612< The argument list and the Dictionary can be combined: >
36033613 function Callback(arg1, count) dict
@@ -4523,13 +4533,13 @@ job_info({job}) *job_info()*
45234533 "status" what | job_status() | returns
45244534 "channel" what | job_getchannel() | returns
45254535 "exitval" only valid when "status" is "dead"
4526- "exit-cb " function to be called on exit
4536+ "exit_cb " function to be called on exit
45274537 "stoponexit" | job-stoponexit |
45284538
45294539job_setoptions({job} , {options} ) *job_setoptions()*
45304540 Change options for {job} . Supported are:
45314541 "stoponexit" | job-stoponexit |
4532- "exit-cb " | job-exit-cb |
4542+ "exit_cb " | job-exit_cb |
45334543
45344544job_start({command} [, {options} ]) *job_start()*
45354545 Start a job and return a Job object. Unlike | system() | and
@@ -6897,8 +6907,7 @@ systemlist({expr} [, {input}]) *systemlist()*
68976907 is the same as | readfile() | will output with {binary} argument
68986908 set to "b".
68996909
6900- Returns an empty string on error, so be careful not to run
6901- into | E706 | .
6910+ Returns an empty string on error.
69026911
69036912
69046913tabpagebuflist([{arg} ]) *tabpagebuflist()*
@@ -7014,6 +7023,33 @@ tanh({expr}) *tanh()*
70147023 {only available when compiled with the | +float | feature}
70157024
70167025
7026+ *timer_start()*
7027+ timer_start({time} , {callback} [, {options} ])
7028+ Create a timer and return the timer ID.
7029+
7030+ {time} is the waiting time in milliseconds. This is the
7031+ minimum time before invoking the callback. When the system is
7032+ busy or Vim is not waiting for input the time will be longer.
7033+
7034+ {callback} is the function to call. It can be the name of a
7035+ function or a Funcref. It is called with one argument, which
7036+ is the timer ID. The callback is only invoked when Vim is
7037+ waiting for input.
7038+
7039+ {options} is a dictionary. Supported entries:
7040+ "repeat" Number of times to repeat calling the
7041+ callback. -1 means forever.
7042+
7043+ Example: >
7044+ func MyHandler(timer)
7045+ echo 'Handler called'
7046+ endfunc
7047+ let timer = timer_start(500, 'MyHandler',
7048+ \ {'repeat': 3})
7049+ < This will invoke MyHandler() three times at 500 msec
7050+ intervals.
7051+ {only available when compiled with the | +timers | feature}
7052+
70177053tolower({expr} ) *tolower()*
70187054 The result is a copy of the String given, with all uppercase
70197055 characters turned into lowercase (just like applying | gu | to
@@ -7570,6 +7606,7 @@ termresponse Compiled with support for |t_RV| and |v:termresponse|.
75707606textobjects Compiled with support for | text-objects | .
75717607tgetent Compiled with tgetent support, able to use a termcap
75727608 or terminfo file.
7609+ timers Compiled with | timer_start() | support.
75737610title Compiled with window title support | 'title' | .
75747611toolbar Compiled with support for | gui-toolbar | .
75757612unix Unix version of Vim.
0 commit comments