Mercurial > vim
comparison runtime/doc/eval.txt @ 13735:a62eeee5f116
Update runtime files.
commit https://github.com/vim/vim/commit/7dda86f2ff35bb80afce4da24782fd58216bbe50
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 20 22:36:41 2018 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 20 Apr 2018 22:45:07 +0200 |
parents | 39fcaaa973db |
children | f309afff6f25 |
comparison
equal
deleted
inserted
replaced
13734:600a38fe5c00 | 13735:a62eeee5f116 |
---|---|
1 *eval.txt* For Vim version 8.0. Last change: 2018 Mar 23 | 1 *eval.txt* For Vim version 8.0. Last change: 2018 Apr 20 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2436 term_list() List get the list of terminal buffers | 2436 term_list() List get the list of terminal buffers |
2437 term_scrape({buf}, {row}) List get row of a terminal screen | 2437 term_scrape({buf}, {row}) List get row of a terminal screen |
2438 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal | 2438 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal |
2439 term_setansicolors({buf}, {colors}) | 2439 term_setansicolors({buf}, {colors}) |
2440 none set ANSI palette in GUI color mode | 2440 none set ANSI palette in GUI color mode |
2441 term_setkill({buf}, {how}) none set signal to stop job in terminal | 2441 term_setkill({buf}, {how}) none set signal to stop job in terminal |
2442 term_setrestore({buf}, {command}) none set command to restore terminal | 2442 term_setrestore({buf}, {command}) none set command to restore terminal |
2443 term_setsize({buf}, {rows}, {cols}) | |
2444 none set the size of a terminal | |
2443 term_start({cmd}, {options}) Job open a terminal window and run a job | 2445 term_start({cmd}, {options}) Job open a terminal window and run a job |
2444 term_wait({buf} [, {time}]) Number wait for screen to be updated | 2446 term_wait({buf} [, {time}]) Number wait for screen to be updated |
2445 test_alloc_fail({id}, {countdown}, {repeat}) | 2447 test_alloc_fail({id}, {countdown}, {repeat}) |
2446 none make memory allocation fail | 2448 none make memory allocation fail |
2447 test_autochdir() none enable 'autochdir' during startup | 2449 test_autochdir() none enable 'autochdir' during startup |
2464 timer_stopall() none stop all timers | 2466 timer_stopall() none stop all timers |
2465 tolower({expr}) String the String {expr} switched to lowercase | 2467 tolower({expr}) String the String {expr} switched to lowercase |
2466 toupper({expr}) String the String {expr} switched to uppercase | 2468 toupper({expr}) String the String {expr} switched to uppercase |
2467 tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} | 2469 tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} |
2468 to chars in {tostr} | 2470 to chars in {tostr} |
2469 trim({text}[, {mask}]) String trim characters in {mask} from {text} | 2471 trim({text}[, {mask}]) String trim characters in {mask} from {text} |
2470 trunc({expr}) Float truncate Float {expr} | 2472 trunc({expr}) Float truncate Float {expr} |
2471 type({name}) Number type of variable {name} | 2473 type({name}) Number type of variable {name} |
2472 undofile({name}) String undo file name for {name} | 2474 undofile({name}) String undo file name for {name} |
2473 undotree() List undo file tree | 2475 undotree() List undo file tree |
2474 uniq({list} [, {func} [, {dict}]]) | 2476 uniq({list} [, {func} [, {dict}]]) |
6214 Note that a NUL character in the file is specified with | 6216 Note that a NUL character in the file is specified with |
6215 nr2char(10), because NULs are represented with newline | 6217 nr2char(10), because NULs are represented with newline |
6216 characters. nr2char(0) is a real NUL and terminates the | 6218 characters. nr2char(0) is a real NUL and terminates the |
6217 string, thus results in an empty string. | 6219 string, thus results in an empty string. |
6218 | 6220 |
6219 option_restore({list}) *option_restore()* | |
6220 Restore options previously saved by option_save(). | |
6221 When buffer-local options have been saved, this function must | |
6222 be called when the same buffer is the current buffer. | |
6223 When window-local options have been saved, this function must | |
6224 be called when the same window is the current window. | |
6225 When in the wrong buffer and/or window an error is given and | |
6226 the local options won't be restored. | |
6227 NOT IMPLEMENTED YET! | |
6228 | |
6229 option_save({list}) *option_save()* | |
6230 Saves the options named in {list}. The returned value can be | |
6231 passed to option_restore(). Example: > | |
6232 let s:saved_options = option_save([ | |
6233 \ 'ignorecase', | |
6234 \ 'iskeyword', | |
6235 \ ]) | |
6236 au <buffer> BufLeave * | |
6237 \ call option_restore(s:saved_options) | |
6238 < The advantage over using `:let` is that global and local | |
6239 values are handled and the script ID is restored, so that | |
6240 `:verbose set` will show where the option was originally set, | |
6241 not where it was restored. | |
6242 NOT IMPLEMENTED YET! | |
6243 | |
6244 or({expr}, {expr}) *or()* | 6221 or({expr}, {expr}) *or()* |
6245 Bitwise OR on the two arguments. The arguments are converted | 6222 Bitwise OR on the two arguments. The arguments are converted |
6246 to a number. A List, Dict or Float argument causes an error. | 6223 to a number. A List, Dict or Float argument causes an error. |
6247 Example: > | 6224 Example: > |
6248 :let bits = or(bits, 0x80) | 6225 :let bits = or(bits, 0x80) |
8200 If the {options} argument is present, it must be a Dict with | 8177 If the {options} argument is present, it must be a Dict with |
8201 these possible members: | 8178 these possible members: |
8202 "term_name" name to use for the buffer name, instead | 8179 "term_name" name to use for the buffer name, instead |
8203 of the first file name. | 8180 of the first file name. |
8204 "term_rows" vertical size to use for the terminal, | 8181 "term_rows" vertical size to use for the terminal, |
8205 instead of using 'termsize' | 8182 instead of using 'termwinsize' |
8206 "term_cols" horizontal size to use for the terminal, | 8183 "term_cols" horizontal size to use for the terminal, |
8207 instead of using 'termsize' | 8184 instead of using 'termwinsize' |
8208 "vertical" split the window vertically | 8185 "vertical" split the window vertically |
8209 "curwin" use the current window, do not split the | 8186 "curwin" use the current window, do not split the |
8210 window; fails if the current buffer | 8187 window; fails if the current buffer |
8211 cannot be |abandon|ed | 8188 cannot be |abandon|ed |
8212 "norestore" do not add the terminal window to a | 8189 "norestore" do not add the terminal window to a |
8420 14 cyan | 8397 14 cyan |
8421 15 white | 8398 15 white |
8422 | 8399 |
8423 These colors are used in the GUI and in the terminal when | 8400 These colors are used in the GUI and in the terminal when |
8424 'termguicolors' is set. When not using GUI colors (GUI mode | 8401 'termguicolors' is set. When not using GUI colors (GUI mode |
8425 or |termguicolors|), the terminal window always uses the 16 | 8402 or 'termguicolors'), the terminal window always uses the 16 |
8426 ANSI colors of the underlying terminal. | 8403 ANSI colors of the underlying terminal. |
8427 {only available when compiled with the |+terminal| feature and | 8404 {only available when compiled with the |+terminal| feature and |
8428 with GUI enabled and/or the |+termguicolors| feature} | 8405 with GUI enabled and/or the |+termguicolors| feature} |
8429 | 8406 |
8430 term_setkill({buf}, {how}) *term_setkill()* | 8407 term_setkill({buf}, {how}) *term_setkill()* |
8447 | 8424 |
8448 Use an empty {command} to run 'shell'. | 8425 Use an empty {command} to run 'shell'. |
8449 Use "NONE" to not restore this window. | 8426 Use "NONE" to not restore this window. |
8450 {only available when compiled with the |+terminal| feature} | 8427 {only available when compiled with the |+terminal| feature} |
8451 | 8428 |
8452 term_setsize({buf}, {rows}, {cols}) *term_setsize()* | 8429 term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955* |
8453 Set the size of terminal {buf}. The size of the window | 8430 Set the size of terminal {buf}. The size of the window |
8454 containing the terminal will also be adjusted, if possible. | 8431 containing the terminal will also be adjusted, if possible. |
8455 If {rows} or {cols} is zero or negative, that dimension is not | 8432 If {rows} or {cols} is zero or negative, that dimension is not |
8456 changed. | 8433 changed. |
8457 | 8434 |
8489 | 8466 |
8490 There are extra options: | 8467 There are extra options: |
8491 "term_name" name to use for the buffer name, instead | 8468 "term_name" name to use for the buffer name, instead |
8492 of the command name. | 8469 of the command name. |
8493 "term_rows" vertical size to use for the terminal, | 8470 "term_rows" vertical size to use for the terminal, |
8494 instead of using 'termsize' | 8471 instead of using 'termwinsize' |
8495 "term_cols" horizontal size to use for the terminal, | 8472 "term_cols" horizontal size to use for the terminal, |
8496 instead of using 'termsize' | 8473 instead of using 'termwinsize' |
8497 "vertical" split the window vertically | 8474 "vertical" split the window vertically |
8498 "curwin" use the current window, do not split the | 8475 "curwin" use the current window, do not split the |
8499 window; fails if the current buffer | 8476 window; fails if the current buffer |
8500 cannot be |abandon|ed | 8477 cannot be |abandon|ed |
8501 "hidden" do not open a window | 8478 "hidden" do not open a window |