diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-07-13 04:04:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-13 04:04:30 -0400 |
commit | 5ea4d58a1b1d3d0cafe5da5ebe4dd64908a2a73c (patch) | |
tree | 82ce47295de86eea65a3b4f738a8af482053b587 /runtime/doc | |
parent | 72ad5a16e734062046965023726791e0e35a50be (diff) | |
parent | 83aea9ccf58f66b70808ed6125eedcd9e8d9324c (diff) | |
download | rneovim-5ea4d58a1b1d3d0cafe5da5ebe4dd64908a2a73c.tar.gz rneovim-5ea4d58a1b1d3d0cafe5da5ebe4dd64908a2a73c.tar.bz2 rneovim-5ea4d58a1b1d3d0cafe5da5ebe4dd64908a2a73c.zip |
Merge #5026 from joshtriplett/term-title-statusline
Please support setting terminal title in :terminal
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/nvim_terminal_emulator.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index 4296ef6490..8f7dc0dbf0 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -10,6 +10,7 @@ Embedded terminal emulator *terminal-emulator* 2. Spawning |terminal-emulator-spawning| 3. Input |terminal-emulator-input| 4. Configuration |terminal-emulator-configuration| +5. Status Variables |terminal-emulator-status| ============================================================================== 1. Introduction *terminal-emulator-intro* @@ -113,4 +114,25 @@ The terminal cursor can be highlighted via |hl-TermCursor| and |hl-TermCursorNC|. ============================================================================== +5. Status Variables *terminal-emulator-status* + +Terminal buffers maintain some information about the terminal in buffer-local +variables: + +- *b:term_title* The settable title of the terminal, typically displayed in + the window title or tab title of a graphical terminal emulator. Programs + running in the terminal can set this title via an escape sequence. +- *b:terminal_job_id* The nvim job ID of the job running in the terminal. See + |job-control| for more information. +- *b:terminal_job_pid* The PID of the top-level process running in the + terminal. + +These variables will have a value by the time the TermOpen autocmd runs, and +will continue to have a value for the lifetime of the terminal buffer, making +them suitable for use in 'statusline'. For example, to show the terminal title +as the status line: +> + :autocmd TermOpen * setlocal statusline=%{b:term_title} +< +============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: |