Mercurial > vim
comparison runtime/doc/eval.txt @ 13438:33eea5ce5415 v8.0.1593
patch 8.0.1593: :qall never exits with an active terminal window
commit https://github.com/vim/vim/commit/25cdd9c33b21ddbd31321c075873bb225450d2d2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 10 20:28:12 2018 +0100
patch 8.0.1593: :qall never exits with an active terminal window
Problem: :qall never exits with an active terminal window.
Solution: Add a way to kill a job in a terminal window.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Mar 2018 20:30:04 +0100 |
parents | 02b3f719eacb |
children | 9eebe457eb3c |
comparison
equal
deleted
inserted
replaced
13437:02b3f719eacb | 13438:33eea5ce5415 |
---|---|
1 *eval.txt* For Vim version 8.0. Last change: 2018 Mar 09 | 1 *eval.txt* For Vim version 8.0. Last change: 2018 Mar 10 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2433 term_gettitle({buf}) String get the title of a terminal | 2433 term_gettitle({buf}) String get the title of a terminal |
2434 term_gettty({buf}, [{input}]) String get the tty name of a terminal | 2434 term_gettty({buf}, [{input}]) String get the tty name of a terminal |
2435 term_list() List get the list of terminal buffers | 2435 term_list() List get the list of terminal buffers |
2436 term_scrape({buf}, {row}) List get row of a terminal screen | 2436 term_scrape({buf}, {row}) List get row of a terminal screen |
2437 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal | 2437 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal |
2438 term_setkill({buf}, {how}) none set signal to stop job in terminal | |
2438 term_setrestore({buf}, {command}) none set command to restore terminal | 2439 term_setrestore({buf}, {command}) none set command to restore terminal |
2439 term_start({cmd}, {options}) Job open a terminal window and run a job | 2440 term_start({cmd}, {options}) Job open a terminal window and run a job |
2440 term_wait({buf} [, {time}]) Number wait for screen to be updated | 2441 term_wait({buf} [, {time}]) Number wait for screen to be updated |
2441 test_alloc_fail({id}, {countdown}, {repeat}) | 2442 test_alloc_fail({id}, {countdown}, {repeat}) |
2442 none make memory allocation fail | 2443 none make memory allocation fail |
8274 {buf} is used as with |term_getsize()|. | 8275 {buf} is used as with |term_getsize()|. |
8275 | 8276 |
8276 The first line has {row} one. When {row} is "." the cursor | 8277 The first line has {row} one. When {row} is "." the cursor |
8277 line is used. When {row} is invalid an empty string is | 8278 line is used. When {row} is invalid an empty string is |
8278 returned. | 8279 returned. |
8280 | |
8281 To get attributes of each character use |term_scrape()|. | |
8279 {only available when compiled with the |+terminal| feature} | 8282 {only available when compiled with the |+terminal| feature} |
8280 | 8283 |
8281 term_getscrolled({buf}) *term_getscrolled()* | 8284 term_getscrolled({buf}) *term_getscrolled()* |
8282 Return the number of lines that scrolled to above the top of | 8285 Return the number of lines that scrolled to above the top of |
8283 terminal {buf}. This is the offset between the row number | 8286 terminal {buf}. This is the offset between the row number |
8358 {buf} is used as with |term_getsize()|. | 8361 {buf} is used as with |term_getsize()|. |
8359 | 8362 |
8360 {keys} are translated as key sequences. For example, "\<c-x>" | 8363 {keys} are translated as key sequences. For example, "\<c-x>" |
8361 means the character CTRL-X. | 8364 means the character CTRL-X. |
8362 {only available when compiled with the |+terminal| feature} | 8365 {only available when compiled with the |+terminal| feature} |
8366 | |
8367 term_setkill({buf}, {how}) *term_setkill()* | |
8368 When exiting Vim or trying to close the terminal window in | |
8369 another way, {how} defines whether the job in the terminal can | |
8370 be stopped. | |
8371 When {how} is empty (the default), the job will not be | |
8372 stopped, trying to exit will result in |E947|. | |
8373 Otherwise, {how} specifies what signal to send to the job. | |
8374 See |job_stop()| for the values. | |
8375 | |
8376 After sending the signal Vim will wait for up to a second to | |
8377 check that the job actually stopped. | |
8363 | 8378 |
8364 term_setrestore({buf}, {command}) *term_setrestore()* | 8379 term_setrestore({buf}, {command}) *term_setrestore()* |
8365 Set the command to write in a session file to restore the job | 8380 Set the command to write in a session file to restore the job |
8366 in this terminal. The line written in the session file is: > | 8381 in this terminal. The line written in the session file is: > |
8367 terminal ++curwin ++cols=%d ++rows=%d {command} | 8382 terminal ++curwin ++cols=%d ++rows=%d {command} |
8414 window; fails if the current buffer | 8429 window; fails if the current buffer |
8415 cannot be |abandon|ed | 8430 cannot be |abandon|ed |
8416 "hidden" do not open a window | 8431 "hidden" do not open a window |
8417 "norestore" do not add the terminal window to a | 8432 "norestore" do not add the terminal window to a |
8418 session file | 8433 session file |
8434 "term_kill" what to do when trying to close the | |
8435 terminal window, see |term_setkill()| | |
8419 "term_finish" What to do when the job is finished: | 8436 "term_finish" What to do when the job is finished: |
8420 "close": close any windows | 8437 "close": close any windows |
8421 "open": open window if needed | 8438 "open": open window if needed |
8422 Note that "open" can be interruptive. | 8439 Note that "open" can be interruptive. |
8423 See |term++close| and |term++open|. | 8440 See |term++close| and |term++open|. |