comparison runtime/doc/eval.txt @ 20836:2616c5a337e0 v8.2.0970

patch 8.2.0970: terminal properties are not available in Vim script Commit: https://github.com/vim/vim/commit/0c0eddd3ddd266bcc2036362fae7b2b8b9d2c7bf Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 13 15:47:25 2020 +0200 patch 8.2.0970: terminal properties are not available in Vim script Problem: Terminal properties are not available in Vim script. Solution: Add the terminalprops() function.
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Jun 2020 16:00:04 +0200
parents 90b96fa35e4b
children 83cfa1ef1bf2
comparison
equal deleted inserted replaced
20835:097884058719 20836:2616c5a337e0
2192 termcap entry. It is set when Vim receives an escape sequence 2192 termcap entry. It is set when Vim receives an escape sequence
2193 that starts with ESC [ or CSI, then '>' or '?' and ends in a 2193 that starts with ESC [ or CSI, then '>' or '?' and ends in a
2194 'c', with only digits and ';' in between. 2194 'c', with only digits and ';' in between.
2195 When this option is set, the TermResponse autocommand event is 2195 When this option is set, the TermResponse autocommand event is
2196 fired, so that you can react to the response from the 2196 fired, so that you can react to the response from the
2197 terminal. 2197 terminal. You can use |terminalprops()| to see what Vim
2198 figured out about the terminal.
2198 The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp 2199 The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp
2199 is the terminal type: 0 for vt100 and 1 for vt220. Pv is the 2200 is the terminal type: 0 for vt100 and 1 for vt220. Pv is the
2200 patch level (since this was introduced in patch 95, it's 2201 patch level (since this was introduced in patch 95, it's
2201 always 95 or bigger). Pc is always zero. 2202 always 95 or bigger). Pc is always zero.
2202 {only when compiled with |+termresponse| feature} 2203 {only when compiled with |+termresponse| feature}
2868 term_setrestore({buf}, {command}) none set command to restore terminal 2869 term_setrestore({buf}, {command}) none set command to restore terminal
2869 term_setsize({buf}, {rows}, {cols}) 2870 term_setsize({buf}, {rows}, {cols})
2870 none set the size of a terminal 2871 none set the size of a terminal
2871 term_start({cmd} [, {options}]) Number open a terminal window and run a job 2872 term_start({cmd} [, {options}]) Number open a terminal window and run a job
2872 term_wait({buf} [, {time}]) Number wait for screen to be updated 2873 term_wait({buf} [, {time}]) Number wait for screen to be updated
2874 terminalprops() Dict properties of the terminal
2873 test_alloc_fail({id}, {countdown}, {repeat}) 2875 test_alloc_fail({id}, {countdown}, {repeat})
2874 none make memory allocation fail 2876 none make memory allocation fail
2875 test_autochdir() none enable 'autochdir' during startup 2877 test_autochdir() none enable 'autochdir' during startup
2876 test_feedinput({string}) none add key sequence to input buffer 2878 test_feedinput({string}) none add key sequence to input buffer
2877 test_garbagecollect_now() none free memory right now for testing 2879 test_garbagecollect_now() none free memory right now for testing
10387 For MS-Windows forward slashes are used when the 'shellslash' 10389 For MS-Windows forward slashes are used when the 'shellslash'
10388 option is set or when 'shellcmdflag' starts with '-'. 10390 option is set or when 'shellcmdflag' starts with '-'.
10389 10391
10390 10392
10391 term_ functions are documented here: |terminal-function-details| 10393 term_ functions are documented here: |terminal-function-details|
10394
10395
10396 terminalprops() *terminalprops()*
10397 Returns a dictionary with properties of the terminal that Vim
10398 detected from the response to |t_RV| request. See
10399 |v:termresponse| for the response itself. If |v:termresponse|
10400 is empty most values here will be 'u' for unknown.
10401 cursor_style wether sending |t_RS| works **
10402 cursor_blink_mode wether sending |t_RC| works **
10403 underline_rgb whether |t_8u| works **
10404 mouse mouse type supported
10405
10406 ** value 'u' for unknown, 'y' for yes, 'n' for no
10407
10408 If the |+termresponse| feature is missing then the result is
10409 an empty dictionary.
10410
10411 If "cursor_style" is 'y' then |t_RS| will be send to request the
10412 current cursor style.
10413 If "cursor_blink_mode" is 'y' then |t_RC| will be send to
10414 request the cursor blink status.
10415 "cursor_style" and "cursor_blink_mode" are also set if |t_u7|
10416 is not empty, Vim will detect the working of sending |t_RS|
10417 and |t_RC| on startup.
10418
10419 When "underline_rgb" is not 'y', then |t_8u| will be made empty.
10420 This avoids sending it to xterm, which would clear the colors.
10421
10422 For "mouse" the value 'u' is unknown
10423
10424 Also see:
10425 - 'ambiwidth' - detected by using |t_u7|.
10426 - |v:termstyleresp| and |v:termblinkresp| for the response to
10427 |t_RS| and |t_RC|.
10428
10392 10429
10393 test_ functions are documented here: |test-functions-details| 10430 test_ functions are documented here: |test-functions-details|
10394 10431
10395 10432
10396 *timer_info()* 10433 *timer_info()*