-*eval.txt* For Vim version 8.0. Last change: 2017 Aug 05
+*eval.txt* For Vim version 8.0. Last change: 2017 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr}
tempname() String name for a temporary file
-term_getattr({attr}, {what} Number get the value of attribute {what}
+term_getattr({attr}, {what}) Number get the value of attribute {what}
term_getcursor({buf}) List get the cursor position of a terminal
term_getjob({buf}) Job get the job associated with a terminal
term_getline({buf}, {row}) String get a line of text from a terminal
underline
strike
reverse
+ {only available when compiled with the |+terminal| feature}
term_getcursor({buf}) *term_getcursor()*
- Get the cusor position of terminal {buf}. Returns a list with
+ Get the cursor position of terminal {buf}. Returns a list with
three numbers: [rows, cols, visible]. "rows" and "cols" are
- one based, the first sceen cell is row 1, column 1.
+ one based, the first screen cell is row 1, column 1.
"visible" is one when the cursor is visible, zero when it is
hidden.
-
+
This is the cursor position of the terminal itself, not of the
Vim window.
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
list is returned.
+ {only available when compiled with the |+terminal| feature}
term_getjob({buf}) *term_getjob()*
Get the Job associated with terminal window {buf}.
{buf} is used as with |term_getsize()|.
Returns |v:null| when there is no job.
+ {only available when compiled with the |+terminal| feature}
term_getline({buf}, {row}) *term_getline()*
Get a line of text from the terminal window of {buf}.
{buf} is used as with |term_getsize()|.
- The first line has {row} one. When {row} "." the cursor line
- is used. When {row} is invalid an empty string is returned.
+ The first line has {row} one. When {row} is "." the cursor
+ line is used. When {row} is invalid an empty string is
+ returned.
+ {only available when compiled with the |+terminal| feature}
term_getsize({buf}) *term_getsize()*
Get the size of terminal {buf}. Returns a list with two
{buf} must be the buffer number of a terminal window. Use an
empty string for the current buffer. If the buffer does not
exist or is not a terminal window, an empty list is returned.
+ {only available when compiled with the |+terminal| feature}
term_getstatus({buf}) *term_getstatus()*
Get the status of terminal {buf}. This returns a comma
separated list of these items:
running job is running
finished job has finished
- terminal in Terminal-Normal mode
+ normal in Terminal-Normal mode
One of "running" or "finished" is always present.
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
string is returned.
+ {only available when compiled with the |+terminal| feature}
term_gettitle({buf}) *term_gettitle()*
Get the title of terminal {buf}. This is the title that the
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
string is returned.
+ {only available when compiled with the |+terminal| feature}
term_gettty({buf}) *term_gettty()*
Get the name of the controlling terminal associated with
terminal window {buf}.
{buf} is used as with |term_getsize()|.
+ {only available when compiled with the |+terminal| feature}
term_list() *term_list()*
Return a list with the buffer numbers of all buffers for
terminal windows.
+ {only available when compiled with the |+terminal| feature}
term_scrape({buf}, {row}) *term_scrape()*
Get the contents of {row} of terminal screen of {buf}.
For {buf} see |term_getsize()|.
- The first line has {row} one. When {row} "." the cursor line
- is used. When {row} is invalid an empty string is returned.
+ The first line has {row} one. When {row} is "." the cursor
+ line is used. When {row} is invalid an empty string is
+ returned.
Return a List containing a Dict for each screen cell:
"chars" character(s) at the cell
"attr" attributes of the cell, use |term_getattr()|
to get the individual flags
"width" cell width: 1 or 2
+ {only available when compiled with the |+terminal| feature}
term_sendkeys({buf}, {keys}) *term_sendkeys()*
Send keystrokes {keys} to terminal {buf}.
{keys} are translated as key sequences. For example, "\<c-x>"
means the character CTRL-X.
+ {only available when compiled with the |+terminal| feature}
term_start({cmd}, {options}) *term_start()*
Open a terminal window and run {cmd} in it.
There is one extra option:
"term_name" name to use for the buffer name, instead of
the command name.
+ {only available when compiled with the |+terminal| feature}
term_wait({buf}) *term_wait()*
Wait for pending updates of {buf} to be handled.
{buf} is used as with |term_getsize()|.
+ {only available when compiled with the |+terminal| feature}
test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
This is for testing: If the memory allocation with {id} is
{"term_getattr", 2, 2, f_term_getattr},
{"term_getcursor", 1, 1, f_term_getcursor},
{"term_getjob", 1, 1, f_term_getjob},
- {"term_getline", 1, 2, f_term_getline},
+ {"term_getline", 2, 2, f_term_getline},
{"term_getsize", 1, 1, f_term_getsize},
{"term_getstatus", 1, 1, f_term_getstatus},
{"term_gettitle", 1, 1, f_term_gettitle},
{"term_gettty", 1, 1, f_term_gettty},
{"term_list", 0, 0, f_term_list},
- {"term_scrape", 1, 2, f_term_scrape},
+ {"term_scrape", 2, 2, f_term_scrape},
{"term_sendkeys", 2, 2, f_term_sendkeys},
{"term_start", 1, 2, f_term_start},
{"term_wait", 1, 1, f_term_wait},