|
1 | | -*eval.txt* For Vim version 8.0. Last change: 2017 Jul 28 |
| 1 | +*eval.txt* For Vim version 8.0. Last change: 2017 Jul 30 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -2369,12 +2369,18 @@ tagfiles() List tags files used |
2369 | 2369 | tan({expr}) Float tangent of {expr} |
2370 | 2370 | tanh({expr}) Float hyperbolic tangent of {expr} |
2371 | 2371 | tempname() String name for a temporary file |
2372 | | -term_getsize() Dict get the size of a terminal |
2373 | | -term_open() Job open a terminal window and run a job |
2374 | | -term_scrape() List inspect terminal screen |
2375 | | -term_sendkeys() Number send keystrokes to a terminal |
2376 | | -term_setsize() Number set the size of a terminal |
2377 | | -term_wait() Number wait for screen to be updated |
| 2372 | +term_getattr({attr}, {what} Number get the value of attribute {what} |
| 2373 | +term_getcursor({buf}) List get the cursor position of a terminal |
| 2374 | +term_getjob({buf}) Job get the job associated with a terminal |
| 2375 | +term_getline({buf}[, {row}]) String get a line of text from a terminal |
| 2376 | +term_getsize({buf}) List get the size of a terminal |
| 2377 | +term_getstatus({buf}) String get the status of a terminal |
| 2378 | +term_gettitle({buf}) String get the title of a terminal |
| 2379 | +term_list() List get the list of terminal buffers |
| 2380 | +term_scrape({buf}[, {row}]) List get row of a terminal screen |
| 2381 | +term_sendkeys({buf}, {keys}) none send keystrokes to a terminal |
| 2382 | +term_start({cmd}, {options}) Job open a terminal window and run a job |
| 2383 | +term_wait({buf}) Number wait for screen to be updated |
2378 | 2384 | test_alloc_fail({id}, {countdown}, {repeat}) |
2379 | 2385 | none make memory allocation fail |
2380 | 2386 | test_autochdir() none enable 'autochdir' during startup |
@@ -7898,23 +7904,106 @@ tempname() *tempname()* *temp-file-name* |
7898 | 7904 | For MS-Windows forward slashes are used when the 'shellslash' |
7899 | 7905 | option is set or when 'shellcmdflag' starts with '-'. |
7900 | 7906 |
|
7901 | | -term_getsize() *term_getsize()* |
7902 | | - Get the size of a terminal. NOT IMPLEMENTED YET |
| 7907 | +term_getattr({attr}, {what}) *term_getattr()* |
| 7908 | + Given {attr}, a value returned by term_scrape() in the "attr" |
| 7909 | + item, return whether {what} is on. {what} can be one of: |
| 7910 | + bold |
| 7911 | + italic |
| 7912 | + underline |
| 7913 | + strike |
| 7914 | + reverse |
| 7915 | + |
| 7916 | +term_getcursor({buf}) *term_getcursor()* |
| 7917 | + Get the cusor position of terminal {buf}. Returns a list with |
| 7918 | + three numbers: [rows, cols, visible]. "rows" and "cols" are |
| 7919 | + zero based. "visible" is one when the cursor is visible, zero |
| 7920 | + when it is hidden. |
| 7921 | + |
| 7922 | + This is the cursor position of the terminal itself, not of the |
| 7923 | + Vim window. |
| 7924 | + |
| 7925 | + {buf} must be the buffer number of a terminal window. If the |
| 7926 | + buffer does not exist or is not a terminal window, an empty |
| 7927 | + list is returned. |
| 7928 | + |
| 7929 | +term_getjob({buf}) *term_getjob()* |
| 7930 | + Get the Job associated with terminal window {buf}. |
| 7931 | + {buf} is used as with |term_getsize()|. |
| 7932 | + |
| 7933 | +term_getline({buf} [, {row}]) *term_getline()* |
| 7934 | + Get a line of text from the terminal window of {buf}. |
| 7935 | + {buf} is used as with |term_getsize()|. |
| 7936 | + |
| 7937 | + The first line has {row} zero. When {row} is invalid an empty |
| 7938 | + string is returned. When {row} is omitted, the cursor line is |
| 7939 | + used. |
| 7940 | + |
| 7941 | +term_getsize({buf}) *term_getsize()* |
| 7942 | + Get the size of terminal {buf}. Returns a list with two |
| 7943 | + numbers: [rows, cols]. This is the size of the terminal, not |
| 7944 | + the window containing the terminal. |
| 7945 | + |
| 7946 | + {buf} must be the buffer number of a terminal window. If the |
| 7947 | + buffer does not exist or is not a terminal window, an empty |
| 7948 | + list is returned. |
| 7949 | + |
| 7950 | +term_getstatus({buf}) *term_getstatus()* |
| 7951 | + Get the status of terminal {buf}. This returns a comma |
| 7952 | + separated list of these items: |
| 7953 | + running job is running |
| 7954 | + finished job has finished |
| 7955 | + terminal in Terminal-Normal mode |
| 7956 | + One of "running" or "finished" is always present. |
| 7957 | + |
| 7958 | + {buf} must be the buffer number of a terminal window. If the |
| 7959 | + buffer does not exist or is not a terminal window, an empty |
| 7960 | + string is returned. |
| 7961 | + |
| 7962 | +term_gettitle({buf}) *term_gettitle()* |
| 7963 | + Get the title of terminal {buf}. This is the title that the |
| 7964 | + job in the terminal has set. |
| 7965 | + |
| 7966 | + {buf} must be the buffer number of a terminal window. If the |
| 7967 | + buffer does not exist or is not a terminal window, an empty |
| 7968 | + string is returned. |
| 7969 | + |
| 7970 | +term_list() *term_list()* |
| 7971 | + Return a list with the buffer numbers of all buffers for |
| 7972 | + terminal windows. |
| 7973 | + |
| 7974 | +term_scrape({buf} [, {row}]) *term_scrape()* |
| 7975 | + Get the contents of {row} of terminal screen of {buf}. |
| 7976 | + For {buf} see |term_getsize()|. |
| 7977 | + |
| 7978 | + The first {row} is zero. When {row} is invalid an empty list |
| 7979 | + is returned. When {row} is omitted the cursor line is used. |
| 7980 | + |
| 7981 | + Return a List containing a Dict for each screen cell: |
| 7982 | + "chars" character(s) at the cell |
| 7983 | + "fg" foreground color as #rrggbb |
| 7984 | + "bg" background color as #rrggbb |
| 7985 | + "attr" attributes of the cell, use term_getattr() |
| 7986 | + to get the individual flags |
| 7987 | + "width" cell width: 1 or 2 |
| 7988 | + |
| 7989 | +term_sendkeys({buf}, {keys}) *term_sendkeys()* |
| 7990 | + Send keystrokes {keys} to terminal {buf}. |
| 7991 | + {buf} is used as with |term_getsize()|. |
7903 | 7992 |
|
7904 | | -term_open() *term_open()* |
7905 | | - Open a terminal window and run a job. NOT IMPLEMENTED YET |
| 7993 | + {keys} are translated as key sequences. For example, "\<c-x>" |
| 7994 | + means the character CTRL-X. |
7906 | 7995 |
|
7907 | | -term_scrape() *term_scrape()* |
7908 | | - Inspect terminal screen. NOT IMPLEMENTED YET |
| 7996 | +term_start({cmd}, {options}) *term_start()* |
| 7997 | + Open a terminal window and run {cmd} in it. |
7909 | 7998 |
|
7910 | | -term_sendkeys() *term_sendkeys()* |
7911 | | - Send keystrokes to a terminal. NOT IMPLEMENTED YET |
| 7999 | + Returns the buffer number of the terminal window. |
| 8000 | + When opening the window fails zero is returned. |
7912 | 8001 |
|
7913 | | -term_setsize() *term_setsize()* |
7914 | | - Set the size of a terminal. NOT IMPLEMENTED YET |
| 8002 | + {options} are not implemented yet. |
7915 | 8003 |
|
7916 | | -term_wait() *term_wait()* |
7917 | | - Wait for screen to be updated. NOT IMPLEMENTED YET |
| 8004 | +term_wait({buf}) *term_wait()* |
| 8005 | + Wait for pending updates of {buf} to be handled. |
| 8006 | + {buf} is used as with |term_getsize()|. |
7918 | 8007 |
|
7919 | 8008 | test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()* |
7920 | 8009 | This is for testing: If the memory allocation with {id} is |
|
0 commit comments