diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-05 14:50:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-05 14:50:12 +0200 |
commit | 78712a7733839598fbc4a61d0582893d22e8adf3 (patch) | |
tree | 5948c59b752fe2bf8e2d06c26030f3fd06f0e71e /runtime | |
parent | 69198197fd4b061be7cadcf441cd8a7246a17148 (diff) | |
download | vim-git-78712a7733839598fbc4a61d0582893d22e8adf3.tar.gz |
patch 8.0.0864: cannot specify the name of a terminalv8.0.0864
Problem: Cannot specify the name of a terminal.
Solution: Add the "term_name" option. (Yasuhiro Matsumoto, closes #1936)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 20 | ||||
-rw-r--r-- | runtime/doc/terminal.txt | 23 |
2 files changed, 23 insertions, 20 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index ff9dac278..261b5ca66 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Aug 03 +*eval.txt* For Vim version 8.0. Last change: 2017 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8008,7 +8008,23 @@ term_start({cmd}, {options}) *term_start()* Returns the buffer number of the terminal window. When opening the window fails zero is returned. - {options} are not implemented yet. + {options} are similar to what is used for |job_start()|, see + |job-options|. However, not all options can be used. These + are supported: + all timeout options + "stoponexit" + "out_cb", "err_cb" + "exit_cb", "close_cb" + "in_io", "in_top", "in_bot", "in_name", "in_buf" + "out_io", "out_name", "out_buf", "out_modifiable", "out_msg" + "err_io", "err_name", "err_buf", "err_modifiable", "err_msg" + However, at least one of stdin, stdout or stderr must be + connected to the terminal. When I/O is connected to the + terminal then the callback function for that part is not used. + + There is one extra option: + "term_name" name to use for the buffer name, instead of + the command name. term_wait({buf}) *term_wait()* Wait for pending updates of {buf} to be handled. diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index f20c18ca3..6a1285f1b 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 01 +*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -92,10 +92,14 @@ Syntax ~ When the buffer associated with the terminal is wiped out the job is killed, similar to calling `job_stop(job, "kill")` +By default the 'bufhidden' option of the buffer will be set to "hide". So long as the job is running: If the window is closed the buffer becomes hidden. The command will not be stopped. The `:buffer` command can be used to turn the current window into a terminal window. If there are unsaved changes this fails, use ! to force, as usual. + *E947* +So long as the job is running, the buffer is considered modified and Vim +cannot be quit easily, see |abandon|. When the job has finished and no changes were made to the buffer: closing the window will wipe out the buffer. @@ -147,23 +151,6 @@ displayed. In Terminal mode the statusline and window title show "(Terminal)". If the job ends while in Terminal mode this changes to "(Terminal-finished)". -Environment variables are used to pass information to the running job: - TERM name of the terminal, 'term' - ROWS number of rows in the terminal initially - LINES same as ROWS - COLUMNS number of columns in the terminal initially - COLORS number of colors, 't_Co' (256*256*256 in the GUI) - VIM_SERVERNAME v:servername - -The |client-server| feature can be used to communicate with the Vim instance -where the job was started. This only works when v:servername is not empty. -If needed you can set it with: > - call remote_startserver('vim-server') - -In the job you can then do something like: > - vim --servername $VIM_SERVERNAME --remote +123 some_file.c -This will open the file "some_file.c" and put the cursor on line 123. - Unix ~ |