Vim documentation: term
main help file
*term.txt* For Vim version 7.3. Last change: 2011 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
Terminal information *terminal-info*
Vim uses information about the terminal you are using to fill the screen and
recognize what keys you hit. If this information is not correct, the screen
may be messed up or keys may not be recognized. The actions which have to be
performed on the screen are accomplished by outputting a string of
characters. Special keys produce a string of characters. These strings are
stored in the terminal options, see |terminal-options|.
NOTE: Most of this is not used when running the |GUI|.
1. Startup |startup-terminal|
2. Terminal options |terminal-options|
3. Window size |window-size|
4. Slow and fast terminals |slow-fast-terminal|
5. Using the mouse |mouse-using|
==============================================================================
1. Startup *startup-terminal*
When Vim is started a default terminal type is assumed. For the Amiga this is
a standard CLI window, for MS-DOS the pc terminal, for Unix an ansi terminal.
A few other terminal types are always available, see below |builtin-terms|.
You can give the terminal name with the '-T' Vim argument. If it is not given
Vim will try to get the name from the TERM environment variable.
*termcap* *terminfo* *E557* *E558* *E559*
On Unix the terminfo database or termcap file is used. This is referred to as
"termcap" in all the documentation. At compile time, when running configure,
the choice whether to use terminfo or termcap is done automatically. When
running Vim the output of ":version" will show |+terminfo| if terminfo is
used. Also see |xterm-screens|.
On non-Unix systems a termcap is only available if Vim was compiled with
TERMCAP defined.
*builtin-terms* *builtin_terms*
Which builtin terminals are available depends on a few defines in feature.h,
which need to be set at compile time:
define output of ":version" terminals builtin
NO_BUILTIN_TCAPS -builtin_terms none
SOME_BUILTIN_TCAPS +builtin_terms most common ones (default)
ALL_BUILTIN_TCAPS ++builtin_terms all available
You can see a list of available builtin terminals with ":set term=xxx" (when
not running the GUI). Also see |+builtin_terms|.
If the termcap code is included Vim will try to get the strings for the
terminal you are using from the termcap file and the builtin termcaps. Both
are always used, if an entry for the terminal you are using is present. Which
one is used first depends on the 'ttybuiltin' option:
'ttybuiltin' on 1: builtin