aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>2017-05-30 00:25:58 +0100
committerJonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>2017-06-03 18:53:29 +0100
commitc2015186741839fed3cd9e4b5a4cbdd188d224df (patch)
tree4c81ffe48aeddb6960815d92f62308a7d27bc4e5
parent4408bd28cbf21a242855c53c7433268c7959ae48 (diff)
downloadrneovim-c2015186741839fed3cd9e4b5a4cbdd188d224df.tar.gz
rneovim-c2015186741839fed3cd9e4b5a4cbdd188d224df.tar.bz2
rneovim-c2015186741839fed3cd9e4b5a4cbdd188d224df.zip
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.
-rw-r--r--runtime/doc/term.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index b6aa37a508..c85ad06957 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -76,13 +76,15 @@ supplying an external one with entries for the terminal type.
Settings depending on terminal *term-dependent-settings*
If you want to set options or mappings, depending on the terminal name, you
-can do this best in your vimrc. Example: >
-
- if &term == "xterm"
- ... xterm maps and settings ...
- elseif &term =~ "vt10."
- ... vt100, vt102 maps and settings ...
- endif
+can do this best in your init.vim. Example: >
+
+ if $TERM =~ '^\(rxvt\|screen\)\(\|-.*\)'
+ set notermguicolors
+ elseif $TERM =~ '^\(xterm\|tmux\)\(\|-.*\)'
+ set termguicolors
+ elseif $TERM =~ ...
+ ... and so forth ...
+ endif
<
*scroll-region* *xterm-scroll-region*
Where possible, Nvim will use the terminal's ability to set a scroll region in