doc: "terminal" always means "embedded terminal emulator"

- Prefer "TUI" where possible to refer to the host terminal.
- Remove obsolete tags and ancient TTY exposition.
- Establish "terminal" to consistently mean "terminal emulator" in all
  Nvim documentation. This removes the need for verbose qualifiers in
  tags and prose.

References #6280
References #6803
This commit is contained in:
Justin M. Keyes
2017-03-15 00:12:21 +01:00
parent eb40b7ec40
commit 8aa0dfd684
9 changed files with 54 additions and 53 deletions

View File

@@ -920,7 +920,7 @@ TermClose When a terminal buffer ends.
{Nvim} *TermOpen* {Nvim} *TermOpen*
TermOpen When a terminal buffer is starting. This can TermOpen When a terminal buffer is starting. This can
be used to configure the terminal emulator by be used to configure the terminal emulator by
setting buffer variables. |terminal-emulator| setting buffer variables. |terminal|
*TermResponse* *TermResponse*
TermResponse After the response to |t_RV| is received from TermResponse After the response to |t_RV| is received from
the terminal. The value of |v:termresponse| the terminal. The value of |v:termresponse|
@@ -967,9 +967,9 @@ VimEnter After doing all the startup stuff, including
VimLeave Before exiting Vim, just after writing the VimLeave Before exiting Vim, just after writing the
.shada file. Executed only once, like .shada file. Executed only once, like
VimLeavePre. VimLeavePre.
To detect an abnormal exit use |v:dying|. < Use |v:dying| to detect an abnormal exit.
When v:dying is 2 or more this event is not Use |v:exiting| to get the exit code.
triggered. Not triggered if |v:dying| is 2 or more.
*VimLeavePre* *VimLeavePre*
VimLeavePre Before exiting Vim, just before writing the VimLeavePre Before exiting Vim, just before writing the
.shada file. This is executed only once, .shada file. This is executed only once,
@@ -977,9 +977,9 @@ VimLeavePre Before exiting Vim, just before writing the
happens to be the current buffer when exiting. happens to be the current buffer when exiting.
Mostly useful with a "*" pattern. > Mostly useful with a "*" pattern. >
:autocmd VimLeavePre * call CleanupStuff() :autocmd VimLeavePre * call CleanupStuff()
< To detect an abnormal exit use |v:dying|. < Use |v:dying| to detect an abnormal exit.
When v:dying is 2 or more this event is not Use |v:exiting| to get the exit code.
triggered. Not triggered if |v:dying| is 2 or more.
*VimResized* *VimResized*
VimResized After the Vim window was resized, thus 'lines' VimResized After the Vim window was resized, thus 'lines'
and/or 'columns' changed. Not when starting and/or 'columns' changed. Not when starting

View File

@@ -63,12 +63,6 @@ NVIM IS... WELL DOCUMENTED *design-documented*
- Documentation should be comprehensive and understandable. Use examples. - Documentation should be comprehensive and understandable. Use examples.
- Don't make the text unnecessarily long. Less documentation means that an - Don't make the text unnecessarily long. Less documentation means that an
item is easier to find. item is easier to find.
- Do not prefix doc-tags with "nvim-". Use |vim_diff.txt| to document
differences from Vim. The {Nvim} annotation is also available
to mark a specific feature. No other distinction is necessary.
- If a feature is removed, delete its doc entry and move its tag to
|vim_diff.txt|.
- Move deprecated features to |deprecated.txt|.
NVIM IS... HIGH SPEED AND SMALL IN SIZE *design-speed-size* NVIM IS... HIGH SPEED AND SMALL IN SIZE *design-speed-size*
@@ -113,7 +107,7 @@ include the kitchen sink... but it's good for plumbing."
============================================================================== ==============================================================================
Developer guidelines *dev-help* Developer guidelines *dev*
JARGON *dev-jargon* JARGON *dev-jargon*
@@ -192,6 +186,18 @@ defined if a valid external Python host is found. That works well with the
Python host isn't installed then the plugin will "think" it is running in Python host isn't installed then the plugin will "think" it is running in
a Vim compiled without the |+python| feature. a Vim compiled without the |+python| feature.
DOCUMENTATION *dev-doc*
- Do not prefix help tags with "nvim-". Use |vim_diff.txt| to document
differences from Vim; no other distinction is necessary.
- If a Vim feature is removed, delete its help section and move its tag to
|vim_diff.txt|.
- Move deprecated features to |deprecated.txt|.
- Use consistent language.
- "terminal" in a help tag always means "the embedded terminal emulator", not
"the user host terminal".
- Use "tui-" to prefix help tags related to the host terminal, and "TUI"
in prose if possible.
API *dev-api* API *dev-api*

View File

@@ -7641,7 +7641,7 @@ termopen({cmd}[, {opts}]) {Nvim} *termopen()*
and `$TERM` is set to "xterm-256color". and `$TERM` is set to "xterm-256color".
Returns the same values as |jobstart()|. Returns the same values as |jobstart()|.
See |terminal-emulator| for more information. See |terminal| for more information.
test_garbagecollect_now() *test_garbagecollect_now()* test_garbagecollect_now() *test_garbagecollect_now()*
Like garbagecollect(), but executed right away. This must Like garbagecollect(), but executed right away. This must

View File

@@ -10,15 +10,18 @@ Nvim embeds a VT220/xterm terminal emulator based on libvterm. The terminal is
presented as a special buffer type, asynchronously updated from the virtual presented as a special buffer type, asynchronously updated from the virtual
terminal as data is received from the program connected to it. terminal as data is received from the program connected to it.
Terminal buffers behave mostly like normal 'nomodifiable' buffers, except: Terminal buffers behave like normal buffers, except:
- Plugins can set 'modifiable' to modify text, but lines cannot be deleted. - With 'modifiable', lines can be edited but not deleted.
- 'scrollback' controls how many off-screen lines are kept. - 'scrollback' controls how many lines are kept.
- Terminal output is followed if the cursor is on the last line. - Output is followed if the cursor is on the last line.
- 'modified' is the default. You can set 'nomodified' to avoid a warning when
closing the terminal buffer.
- 'bufhidden' defaults to "hide".
Type <M-]> to see the table of contents. Type <M-]> to see the table of contents.
============================================================================== ==============================================================================
Spawning *terminal-emulator-spawning* Start *terminal-start*
There are 3 ways to create a terminal buffer: There are 3 ways to create a terminal buffer:
@@ -35,13 +38,12 @@ There are 3 ways to create a terminal buffer:
autocmd VimEnter * nested split term://sh autocmd VimEnter * nested split term://sh
< This is only mentioned for reference; use |:terminal| instead. < This is only mentioned for reference; use |:terminal| instead.
When the terminal spawns the program, the buffer will start to mirror the When the terminal starts, the buffer contents are updated and the buffer is
terminal display and change its name to `term://{cwd}//{pid}:{cmd}`. named in the form of `term://{cwd}//{pid}:{cmd}`. This naming scheme is used
The "term://..." scheme enables |:mksession| to "restore" a terminal buffer by by |:mksession| to restore a terminal buffer (by restarting the {cmd}).
restarting the {cmd} when the session is loaded.
============================================================================== ==============================================================================
Input *terminal-emulator-input* Input *terminal-input*
To send input, enter |Terminal-mode| using any command that would enter "insert To send input, enter |Terminal-mode| using any command that would enter "insert
mode" in a normal buffer, such as |i| or |:startinsert|. In this mode all keys mode" in a normal buffer, such as |i| or |:startinsert|. In this mode all keys
@@ -83,9 +85,9 @@ Mouse input has the following behavior:
the terminal wont lose focus and the hovered window will be scrolled. the terminal wont lose focus and the hovered window will be scrolled.
============================================================================== ==============================================================================
Configuration *terminal-emulator-configuration* Configuration *terminal-configuration*
Options: 'scrollback' Options: 'modified', 'scrollback'
Events: |TermOpen|, |TermClose| Events: |TermOpen|, |TermClose|
Highlight groups: |hl-TermCursor|, |hl-TermCursorNC| Highlight groups: |hl-TermCursor|, |hl-TermCursorNC|
@@ -99,17 +101,15 @@ global configuration.
You can change the defaults with a TermOpen autocommand: > You can change the defaults with a TermOpen autocommand: >
au TermOpen * setlocal list au TermOpen * setlocal list
Terminal colors can be customized with these variables: TERMINAL COLORS ~
- `{g,b}:terminal_color_$NUM`: The terminal color palette, where `$NUM` is the The `{g,b}:terminal_color_$NUM` variables control the terminal color palette,
color index, between 0 and 255 inclusive. This setting only affects UIs with where `$NUM` is the color index between 0 and 255 inclusive. This setting only
RGB capabilities; for normal terminals the color index is simply forwarded. affects UIs with RGB capabilities; for normal terminals the color index is
just forwarded. The variables are read only during |TermOpen|.
The `{g,b}:terminal_color_$NUM` variables are processed only when the terminal
starts (after |TermOpen|).
============================================================================== ==============================================================================
Status Variables *terminal-emulator-status* Status Variables *terminal-status*
Terminal buffers maintain some information about the terminal in buffer-local Terminal buffers maintain some information about the terminal in buffer-local
variables: variables:

View File

@@ -4794,7 +4794,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer local to buffer
Maximum number of lines kept beyond the visible screen. Lines at the Maximum number of lines kept beyond the visible screen. Lines at the
top are deleted if new lines exceed this limit. top are deleted if new lines exceed this limit.
Only in |terminal-emulator| buffers. 'buftype' Only in |terminal| buffers.
-1 means "unlimited" for normal buffers, 100000 otherwise. -1 means "unlimited" for normal buffers, 100000 otherwise.
Minimum is 1. Minimum is 1.

View File

@@ -4,7 +4,7 @@
NVIM REFERENCE MANUAL NVIM REFERENCE MANUAL
Terminal information Terminal UI *tui*
Nvim (except in |--headless| mode) uses information about the terminal you are Nvim (except in |--headless| mode) uses information about the terminal you are
using to present a built-in UI. If that information is not correct, the using to present a built-in UI. If that information is not correct, the
@@ -225,14 +225,7 @@ On Unix systems, three methods are tried to get the window size:
If everything fails a default size of 24 lines and 80 columns is assumed. If If everything fails a default size of 24 lines and 80 columns is assumed. If
a window-resize signal is received the size will be set again. If the window a window-resize signal is received the size will be set again. If the window
size is wrong you can use the 'lines' and 'columns' options to set the size is wrong you can use the 'lines' and 'columns' options to set the
correct values. correct values. See |:mode|.
One command can be used to set the screen size:
*:mod* *:mode*
:mod[e]
Detects the screen size and redraws the screen.
============================================================================== ==============================================================================
Slow and fast terminals *slow-fast-terminal* Slow and fast terminals *slow-fast-terminal*
@@ -343,13 +336,12 @@ before using the mouse:
"g<RightMouse>" is "<C-RightMouse> ("CTRL-T") "g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
*bracketed-paste-mode* *bracketed-paste-mode*
Bracketed paste mode allows terminal emulators to distinguish between typed Bracketed paste mode allows terminal applications to distinguish between typed
text and pasted text. text and pasted text. Thus you can paste text without Nvim trying to format or
indent the text. See also https://cirw.in/blog/bracketed-paste
For terminal emulators that support it, this mode is enabled by default. Thus Nvim enables bracketed paste by default. If it does not work in your terminal,
you can paste text without Nvim giving any special meaning to it, e.g. it will try the 'paste' option instead.
not auto-indent the pasted text. See https://cirw.in/blog/bracketed-paste for
technical details.
*mouse-mode-table* *mouse-overview* *mouse-mode-table* *mouse-overview*
A short overview of what the mouse buttons do, when 'mousemodel' is "extend": A short overview of what the mouse buttons do, when 'mousemodel' is "extend":

View File

@@ -61,7 +61,7 @@ these differences.
MAJOR COMPONENTS ~ MAJOR COMPONENTS ~
Embedded terminal emulator |terminal-emulator| Embedded terminal emulator |terminal|
RPC API |RPC| RPC API |RPC|
Shared data |shada| Shared data |shada|
XDG base directories |xdg| XDG base directories |xdg|

View File

@@ -523,6 +523,9 @@ CTRL-W > Increase current window width by N (default 1).
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar* :vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
CTRL-W | Set current window width to N (default: widest possible). CTRL-W | Set current window width to N (default: widest possible).
*:mod* *:mode*
:mod[e] Detects the screen size and redraws the screen.
You can also resize a window by dragging a status line up or down with the You can also resize a window by dragging a status line up or down with the
mouse. Or by dragging a vertical separator line left or right. This only mouse. Or by dragging a vertical separator line left or right. This only
works if the version of Vim that is being used supports the mouse and the works if the version of Vim that is being used supports the mouse and the

View File

@@ -135,7 +135,7 @@ preprocess_patch() {
local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$ 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file" ' +w +q "$file"
# Remove channel.txt, netbeans.txt, os_*.txt, term.txt, todo.txt, version*.txt, tags # Remove channel.txt, netbeans.txt, os_*.txt, term.txt, todo.txt, version*.txt, tags
local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|tags' local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|tags'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$ 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$