📄 term.txt
字号:
t_ms if non-empty, cursor can be moved in standout/inverse mode t_nd non destructive space character *t_nd* *'t_nd'* t_op reset to original color pair *t_op* *'t_op'* t_RI cursor number of chars right *t_RI* *'t_RI'* t_Sb set background color *t_Sb* *'t_Sb'* t_Sf set foreground color *t_Sf* *'t_Sf'* t_se standout end *t_se* *'t_se'* t_so standout mode *t_so* *'t_so'* t_sr scroll reverse (backward) *t_sr* *'t_sr'* t_te out of "termcap" mode *t_te* *'t_te'* t_ti put terminal in "termcap" mode *t_ti* *'t_ti'* t_ts set window title start (to status line) *t_ts* *'t_ts'* t_ue underline end *t_ue* *'t_ue'* t_us underline mode *t_us* *'t_us'* t_vb visual bell *t_vb* *'t_vb'* t_ve cursor visible *t_ve* *'t_ve'* t_vi cursor invisible *t_vi* *'t_vi'* t_vs cursor very visible *t_vs* *'t_vs'* *t_xs* *'t_xs'* t_xs if non-empty, standout not erased by overwriting (hpterm) t_ZH italics mode *t_ZH* *'t_ZH'* t_ZR italics end *t_ZR* *'t_ZR'*Added by Vim (there are no standard codes for these): t_IS set icon text start *t_IS* *'t_IS'* t_IE set icon text end *t_IE* *'t_IE'* t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'* t_WS set window size (height, width) in characters *t_WS* *'t_WS'* t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*KEY CODESNote: Use the <> form if possible option name meaning ~ t_ku <Up> arrow up *t_ku* *'t_ku'* t_kd <Down> arrow down *t_kd* *'t_kd'* t_kr <Right> arrow right *t_kr* *'t_kr'* t_kl <Left> arrow left *t_kl* *'t_kl'* <S-Up> shift arrow up <S-Down> shift arrow down t_%i <S-Right> shift arrow right *t_%i* *'t_%i'* t_#4 <S-Left> shift arrow left *t_#4* *'t_#4'* t_k1 <F1> function key 1 *t_k1* *'t_k1'* <xF1> alternate F1 *<xF1>* t_k2 <F2> function key 2 *<F2>* *t_k2* *'t_k2'* <xF2> alternate F2 *<xF2>* t_k3 <F3> function key 3 *<F3>* *t_k3* *'t_k3'* <xF3> alternate F3 *<xF3>* t_k4 <F4> function key 4 *<F4>* *t_k4* *'t_k4'* <xF4> alternate F4 *<xF4>* t_k5 <F5> function key 5 *<F5>* *t_k5* *'t_k5'* t_k6 <F6> function key 6 *<F6>* *t_k6* *'t_k6'* t_k7 <F7> function key 7 *<F7>* *t_k7* *'t_k7'* t_k8 <F8> function key 8 *<F8>* *t_k8* *'t_k8'* t_k9 <F9> function key 9 *<F9>* *t_k9* *'t_k9'* t_k; <F10> function key 10 *<F10>* *t_k;* *'t_k;'* t_F1 <F11> function key 11 *<F11>* *t_F1* *'t_F1'* t_F2 <F12> function key 12 *<F12>* *t_F2* *'t_F2'* t_F3 <F13> function key 13 *<F13>* *t_F3* *'t_F3'* t_F4 <F14> function key 14 *<F14>* *t_F4* *'t_F4'* t_F5 <F15> function key 15 *<F15>* *t_F5* *'t_F5'* t_F6 <F16> function key 16 *<F16>* *t_F6* *'t_F6'* t_F7 <F17> function key 17 *<F17>* *t_F7* *'t_F7'* t_F8 <F18> function key 18 *<F18>* *t_F8* *'t_F8'* t_F9 <F19> function key 19 *<F19>* *t_F9* *'t_F9'* <S-F1> shifted function key 1 <S-xF1> alternate <S-F1> *<S-xF1>* <S-F2> shifted function key 2 *<S-F2>* <S-xF2> alternate <S-F2> *<S-xF2>* <S-F3> shifted function key 3 *<S-F3>* <S-xF3> alternate <S-F3> *<S-xF3>* <S-F4> shifted function key 4 *<S-F4>* <S-xF4> alternate <S-F4> *<S-xF4>* <S-F5> shifted function key 5 *<S-F5>* <S-F6> shifted function key 6 *<S-F6>* <S-F7> shifted function key 7 *<S-F7>* <S-F8> shifted function key 8 *<S-F8>* <S-F9> shifted function key 9 *<S-F9>* <S-F10> shifted function key 10 *<S-F10>* <S-F11> shifted function key 11 *<S-F11>* <S-F12> shifted function key 12 *<S-F12>* <S-Tab> shifted Tab key *<S-Tab>* t_%1 <Help> help key *t_%1* *'t_%1'* t_&8 <Undo> undo key *t_&8* *'t_&8'* t_kI <Insert> insert key *t_kI* *'t_kI'* t_kD <Del> delete key *t_kD* *'t_kD'* t_kb <BS> backspace key *t_kb* *'t_kb'* t_kh <Home> home key *t_kh* *'t_kh'* t_#2 <S-Home> shifted home key *<S-Home>* *t_#2* *'t_#2'* <xHome> alternate home key *<xHome>* t_@7 <End> end key *t_@7* *'t_@7'* t_*7 <S-End> shifted end key *<S-End>* *t_star7* *'t_star7'* <xEnd> alternate end key *<xEnd>* t_kP <PageUp> page-up key *t_kP* *'t_kP'* t_kN <PageDown> page-down key *t_kN* *'t_kN'* t_K1 <kHome> keypad home key *t_K1* *'t_K1'* t_K4 <kEnd> keypad end key *t_K4* *'t_K4'* t_K3 <kPageUp> keypad page-up key *t_K3* *'t_K3'* t_K5 <kPageDown> keypad page-down key *t_K5* *'t_K5'* t_K6 <kPlus> keypad plus key *<kPlus>* *t_K6* *'t_K6'* t_K7 <kMinus> keypad minus key *<kMinus>* *t_K7* *'t_K7'* t_K8 <kDivide> keypad divide *<kDivide>* *t_K8* *'t_K8'* t_K9 <kMultiply> keypad multiply *<kMultiply>* *t_K9* *'t_K9'* t_KA <kEnter> keypad enter key *<kEnter>* *t_KA* *'t_KA'* <Mouse> leader of mouse code *<Mouse>*Note about t_so and t_mr: When the termcap entry "so" is not present theentry for "mr" is used. And vice versa. The same is done for "se" and "me".If your terminal supports both inversion and standout mode, you can see twodifferent modes. If you terminal supports only one of the modes, both willlook the same. *termcap-colors*Note about colors: The 't_Co' option tells Vim the number of colors available.When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.If one of these is not available, 't_Sb' and 't_Sf' are used. *termcap-title*The 't_ts' and 't_fs' options are used to set the window title if the terminalallows title setting via sending strings. They are sent before and after thetitle string, respectively. Similar 't_IS' and 't_IE' are used to set theicon text. These are Vim-internal extensions of the Unix termcap, so theycannot be obtained from an external termcap. However, the builtin termcapcontains suitable entries for xterm and iris-ansi, so you don't need to setthem here. *hpterm*If inversion or other highlighting does not work correctly, try setting the't_xs' option to a non-empty string. This makes the 't_ce' code be used toremove highlighting from a line. This is required for "hpterm". Setting the'weirdinvert' option has the same effect as making 't_xs' non-empty, and viceversa.Some termcaps do not include an entry for 'cs' (scroll region), although theterminal does support it. For example: xterm on a sun. You can use thebuiltin_xterm or define t_cs yourself. For example:> :set t_cs=^V^[[%i%d;%drWhere ^V is CTRL-V and ^[ is <Esc>.Unfortunately it is not possible to deduce from the termcap how cursorpositioning should be done when using a scrolling region: Relative to thebeginning of the screen or relative to the beginning of the scrolling region.Most terminals use the first method. A known exception is the MS-DOS console(pcterm). The 't_CS' option should be set to any string when cursorpositioning is relative to the start of the scrolling region. It should beset to an empty string otherwise. It is default "yes" when 'term' is"pcterm".Note for xterm users: The shifted cursor keys normally don't work. You can make them work with the xmodmap command and some mappings in Vim. Give these commands in the xterm: xmodmap -e "keysym Up = Up F13" xmodmap -e "keysym Down = Down F16" xmodmap -e "keysym Left = Left F18" xmodmap -e "keysym Right = Right F19" And use these mappings in Vim: :map <t_F3> <S-Up> :map! <t_F3> <S-Up> :map <t_F6> <S-Down> :map! <t_F6> <S-Down> :map <t_F8> <S-Left> :map! <t_F8> <S-Left> :map <t_F9> <S-Right> :map! <t_F9> <S-Right>Instead of, say, <S-Up> you can use any other command that you want to use theshift-cursor-up key for. (Note: To help people that have a Sun keyboard withleft side keys F14 is not used because it is confused with the undo key; F15is not used, because it does a window-to-front; F17 is not used, because itcloses the window. On other systems you can probably use them)==============================================================================3. Window size *window-size*[This is about the size of the whole window Vim is using, not a window that iscreated with the :split command]If you are running Vim on an Amiga and the terminal name is "amiga" or"builtin_amiga", the amiga-specific window resizing will be enabled. On Unixsystems three methods are tried to get the window size:- an ioctl call (TIOCGSIZE or TIOCGWINSZ, depends on your system)- the environment variables "LINES" and "COLUMNS"- from the termcap entries "li" and "co"If everything fails a default size of 24 lines and 80 columns is assumed. Ifa window-resize signal is received the size will be set again. If the windowsize is wrong you can use the 'lines' and 'columns' options to set thecorrect values.One command can be used to set the screen size: *:mod* *:mode*:mod[e] [mode]Without argument this only detects the screen size and redraws the screen.With MS-DOS it is possible to switch screen mode. [mode] can be one of thesevalues: "bw40" 40 columns black&white "c40" 40 columns color "bw80" 80 columns black&white "c80" 80 columns color (most people use this) "mono" 80 columns monochrome "c4350" 43 or 50 lines EGA/VGA mode number mode number to use, depends on your video card==============================================================================4. Slow and fast terminals *slow-fast-terminal* *slow-terminal*If you have a fast terminal you may like to set the 'ruler' option. Thecursor position is shown in the status line. If you are using horizontalscrolling ('wrap' option off) consider setting 'sidescroll' to a smallnumber.If you have a slow terminal you may want to reset the 'showcmd' option.The command characters will not be shown in the status line. If the terminalscrolls very slowly, set the 'scrolljump' to 5 or so. If the cursor is movedoff the screen (e.g., with "j") Vim will scroll 5 lines at a time. Anotherpossibility is to reduce the number of lines that Vim uses with the command"z{height}<CR>".If the characters from the terminal are arriving with more than 1 secondbetween them you might want to set the 'timeout' and/or 'ttimeout' option.See the "Options" chapter |options|.If your terminal does not support a scrolling region, but it does supportinsert/delete line commands, scrolling with multiple windows may make thelines jump up and down. If you don't want this set the 'ttyfast' option.This will redraw the window instead of scroll it.If your terminal scrolls very slowly, but redrawing is not slow, set the'ttyscroll' option to a small number, e.g., 3. This will make Vim redraw thescreen instead of scrolling, when there are more than 3 lines to be scrolled.If you are using Vim over a slow serial line, you might want to try runningVim inside the "screen" program. Screen will optimize the terminal I/O quitea bit.If you are testing termcap options, but you cannot see what is happening,you might want to set the 'writedelay' option. When non-zero, one character
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -