summaryrefslogtreecommitdiffstats
path: root/runtime/doc/terminal.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
commitaafdfa61bb0af95e98ca825d1f7839801c22d434 (patch)
treeb792417ed6c2f7764f816aecd177e46b1baad149 /runtime/doc/terminal.txt
parentAdding debian version 2:9.1.0016-1. (diff)
downloadvim-aafdfa61bb0af95e98ca825d1f7839801c22d434.tar.xz
vim-aafdfa61bb0af95e98ca825d1f7839801c22d434.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/doc/terminal.txt')
-rw-r--r--runtime/doc/terminal.txt29
1 files changed, 18 insertions, 11 deletions
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index c5331fa..c99b882 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 9.1. Last change: 2023 Nov 08
+*terminal.txt* For Vim version 9.1. Last change: 2024 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -208,6 +208,7 @@ Command syntax ~
[command]. Use `:execute` if you must have a Vim
command following in the same line.
+ *terminal-bufname*
A new buffer will be created, using [command] or
'shell' as the name, prefixed with a "!". If a buffer
by this name already exists a number is added in
@@ -302,6 +303,12 @@ current window into a terminal window. If there are unsaved changes this
fails, use ! to force, as usual.
*terminal-close*
+When the terminal job finishes and no [command] was given (e.g. the 'shell'
+command was executed), the terminal window will be closed by default (unless
+the buffer in next window receiving the space has the 'nobuflisted' option set,
+in which case the terminal window would not be closed automatically, but a new
+empty buffer would be opened in that window).
+
When the terminal window is closed, e.g. when the shell exits and "++close"
argument was used, and this is the last normal Vim window, then Vim will exit.
This is like using |:quit| in a normal window. Help and preview windows are
@@ -1024,17 +1031,17 @@ This can be used to pass the current directory from a shell to Vim.
Put this in your .vimrc: >
def g:Tapi_lcd(_, path: string)
if isdirectory(path)
- execute 'silent lcd ' .. fnameescape(path)
- endif
+ execute 'silent lcd ' .. fnameescape(path)
+ endif
enddef
<
And, in a bash init file: >
- if [[ -n "$VIM_TERMINAL" ]]; then
- PROMPT_COMMAND='_vim_sync_PWD'
- function _vim_sync_PWD() {
- printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD"
- }
- fi
+ if [[ -n "$VIM_TERMINAL" ]]; then
+ PROMPT_COMMAND='_vim_sync_PWD'
+ function _vim_sync_PWD() {
+ printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD"
+ }
+ fi
<
Or, for zsh: >
if [[ -n "$VIM_TERMINAL" ]]; then
@@ -1402,8 +1409,8 @@ Other commands ~
*:Asm* jump to the window with the disassembly, create it if there
isn't one
*:Var* jump to the window with the local and argument variables,
- create it if there isn't one. This window updates whenever the
- program is stopped
+ create it if there isn't one. This window updates whenever the
+ program is stopped
Events ~
*termdebug-events*