mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 11:55:34 +00:00
doco: Correct :help term-dependent-settings .
The example used &term which is no longer meaningful. Fortunately, we can change this into a useful example using $TERM that also shows how to address a common need with termguicolors at the same time.
This commit is contained in:
@@ -76,13 +76,15 @@ supplying an external one with entries for the terminal type.
|
|||||||
Settings depending on terminal *term-dependent-settings*
|
Settings depending on terminal *term-dependent-settings*
|
||||||
|
|
||||||
If you want to set options or mappings, depending on the terminal name, you
|
If you want to set options or mappings, depending on the terminal name, you
|
||||||
can do this best in your vimrc. Example: >
|
can do this best in your init.vim. Example: >
|
||||||
|
|
||||||
if &term == "xterm"
|
if $TERM =~ '^\(rxvt\|screen\)\(\|-.*\)'
|
||||||
... xterm maps and settings ...
|
set notermguicolors
|
||||||
elseif &term =~ "vt10."
|
elseif $TERM =~ '^\(xterm\|tmux\)\(\|-.*\)'
|
||||||
... vt100, vt102 maps and settings ...
|
set termguicolors
|
||||||
endif
|
elseif $TERM =~ ...
|
||||||
|
... and so forth ...
|
||||||
|
endif
|
||||||
<
|
<
|
||||||
*scroll-region* *xterm-scroll-region*
|
*scroll-region* *xterm-scroll-region*
|
||||||
Where possible, Nvim will use the terminal's ability to set a scroll region in
|
Where possible, Nvim will use the terminal's ability to set a scroll region in
|
||||||
|
|||||||
Reference in New Issue
Block a user