1- *eval.txt* For Vim version 8.0. Last change: 2017 Aug 03
1+ *eval.txt* For Vim version 8.0. Last change: 2017 Aug 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2369,7 +2369,7 @@ tagfiles() List tags files used
23692369tan({expr} ) Float tangent of {expr}
23702370tanh({expr} ) Float hyperbolic tangent of {expr}
23712371tempname() String name for a temporary file
2372- term_getattr({attr} , {what} Number get the value of attribute {what}
2372+ term_getattr({attr} , {what} ) Number get the value of attribute {what}
23732373term_getcursor({buf} ) List get the cursor position of a terminal
23742374term_getjob({buf} ) Job get the job associated with a terminal
23752375term_getline({buf} , {row} ) String get a line of text from a terminal
@@ -2381,7 +2381,7 @@ term_list() List get the list of terminal buffers
23812381term_scrape({buf} , {row} ) List get row of a terminal screen
23822382term_sendkeys({buf} , {keys} ) none send keystrokes to a terminal
23832383term_start({cmd} , {options} ) Job open a terminal window and run a job
2384- term_wait({buf} ) Number wait for screen to be updated
2384+ term_wait({buf} [, {time} ]) Number wait for screen to be updated
23852385test_alloc_fail({id} , {countdown} , {repeat} )
23862386 none make memory allocation fail
23872387test_autochdir() none enable 'autochdir' during startup
@@ -4368,6 +4368,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
43684368 highlight highlight groups
43694369 history :history suboptions
43704370 locale locale names (as output of locale -a)
4371+ mapclear buffer argument
43714372 mapping mapping name
43724373 menu menus
43734374 messages | :messages | suboptions
@@ -7915,32 +7916,37 @@ term_getattr({attr}, {what}) *term_getattr()*
79157916 underline
79167917 strike
79177918 reverse
7919+ {only available when compiled with the | +terminal | feature}
79187920
79197921term_getcursor({buf} ) *term_getcursor()*
7920- Get the cusor position of terminal {buf} . Returns a list with
7922+ Get the cursor position of terminal {buf} . Returns a list with
79217923 three numbers: [rows, cols, visible]. "rows" and "cols" are
7922- one based, the first sceen cell is row 1, column 1.
7924+ one based, the first screen cell is row 1, column 1.
79237925 "visible" is one when the cursor is visible, zero when it is
79247926 hidden.
7925-
7927+
79267928 This is the cursor position of the terminal itself, not of the
79277929 Vim window.
79287930
79297931 {buf} must be the buffer number of a terminal window. If the
79307932 buffer does not exist or is not a terminal window, an empty
79317933 list is returned.
7934+ {only available when compiled with the | +terminal | feature}
79327935
79337936term_getjob({buf} ) *term_getjob()*
79347937 Get the Job associated with terminal window {buf} .
79357938 {buf} is used as with | term_getsize() | .
79367939 Returns | v:null | when there is no job.
7940+ {only available when compiled with the | +terminal | feature}
79377941
79387942term_getline({buf} , {row} ) *term_getline()*
79397943 Get a line of text from the terminal window of {buf} .
79407944 {buf} is used as with | term_getsize() | .
79417945
7942- The first line has {row} one. When {row} "." the cursor line
7943- is used. When {row} is invalid an empty string is returned.
7946+ The first line has {row} one. When {row} is "." the cursor
7947+ line is used. When {row} is invalid an empty string is
7948+ returned.
7949+ {only available when compiled with the | +terminal | feature}
79447950
79457951term_getsize({buf} ) *term_getsize()*
79467952 Get the size of terminal {buf} . Returns a list with two
@@ -7950,18 +7956,20 @@ term_getsize({buf}) *term_getsize()*
79507956 {buf} must be the buffer number of a terminal window. Use an
79517957 empty string for the current buffer. If the buffer does not
79527958 exist or is not a terminal window, an empty list is returned.
7959+ {only available when compiled with the | +terminal | feature}
79537960
79547961term_getstatus({buf} ) *term_getstatus()*
79557962 Get the status of terminal {buf} . This returns a comma
79567963 separated list of these items:
79577964 running job is running
79587965 finished job has finished
7959- terminal in Terminal-Normal mode
7966+ normal in Terminal-Normal mode
79607967 One of "running" or "finished" is always present.
79617968
79627969 {buf} must be the buffer number of a terminal window. If the
79637970 buffer does not exist or is not a terminal window, an empty
79647971 string is returned.
7972+ {only available when compiled with the | +terminal | feature}
79657973
79667974term_gettitle({buf} ) *term_gettitle()*
79677975 Get the title of terminal {buf} . This is the title that the
@@ -7970,22 +7978,26 @@ term_gettitle({buf}) *term_gettitle()*
79707978 {buf} must be the buffer number of a terminal window. If the
79717979 buffer does not exist or is not a terminal window, an empty
79727980 string is returned.
7981+ {only available when compiled with the | +terminal | feature}
79737982
79747983term_gettty({buf} ) *term_gettty()*
79757984 Get the name of the controlling terminal associated with
79767985 terminal window {buf} .
79777986 {buf} is used as with | term_getsize() | .
7987+ {only available when compiled with the | +terminal | feature}
79787988
79797989term_list() *term_list()*
79807990 Return a list with the buffer numbers of all buffers for
79817991 terminal windows.
7992+ {only available when compiled with the | +terminal | feature}
79827993
79837994term_scrape({buf} , {row} ) *term_scrape()*
79847995 Get the contents of {row} of terminal screen of {buf} .
79857996 For {buf} see | term_getsize() | .
79867997
7987- The first line has {row} one. When {row} "." the cursor line
7988- is used. When {row} is invalid an empty string is returned.
7998+ The first line has {row} one. When {row} is "." the cursor
7999+ line is used. When {row} is invalid an empty string is
8000+ returned.
79898001
79908002 Return a List containing a Dict for each screen cell:
79918003 "chars" character(s) at the cell
@@ -7994,25 +8006,47 @@ term_scrape({buf}, {row}) *term_scrape()*
79948006 "attr" attributes of the cell, use | term_getattr() |
79958007 to get the individual flags
79968008 "width" cell width: 1 or 2
8009+ {only available when compiled with the | +terminal | feature}
79978010
79988011term_sendkeys({buf} , {keys} ) *term_sendkeys()*
79998012 Send keystrokes {keys} to terminal {buf} .
80008013 {buf} is used as with | term_getsize() | .
80018014
80028015 {keys} are translated as key sequences. For example, "\<c-x> "
80038016 means the character CTRL-X .
8017+ {only available when compiled with the | +terminal | feature}
80048018
80058019term_start({cmd} , {options} ) *term_start()*
80068020 Open a terminal window and run {cmd} in it.
80078021
80088022 Returns the buffer number of the terminal window.
80098023 When opening the window fails zero is returned.
80108024
8011- {options} are not implemented yet.
8012-
8013- term_wait({buf} ) *term_wait()*
8025+ {options} are similar to what is used for | job_start() | , see
8026+ | job-options | . However, not all options can be used. These
8027+ are supported:
8028+ all timeout options
8029+ "stoponexit"
8030+ "out_cb", "err_cb"
8031+ "exit_cb", "close_cb"
8032+ "in_io", "in_top", "in_bot", "in_name", "in_buf"
8033+ "out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
8034+ "err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
8035+ However, at least one of stdin, stdout or stderr must be
8036+ connected to the terminal. When I/O is connected to the
8037+ terminal then the callback function for that part is not used.
8038+
8039+ There is one extra option:
8040+ "term_name" name to use for the buffer name, instead of
8041+ the command name.
8042+ {only available when compiled with the | +terminal | feature}
8043+
8044+ term_wait({buf} [, {time} ]) *term_wait()*
80148045 Wait for pending updates of {buf} to be handled.
80158046 {buf} is used as with | term_getsize() | .
8047+ {time} is how long to wait for updates to arrive in msec. If
8048+ not set then 10 msec will be used.
8049+ {only available when compiled with the | +terminal | feature}
80168050
80178051test_alloc_fail({id} , {countdown} , {repeat} ) *test_alloc_fail()*
80188052 This is for testing: If the memory allocation with {id} is
0 commit comments