diff options
author | Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> | 2017-05-25 20:43:48 +0100 |
---|---|---|
committer | Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> | 2017-06-03 18:53:27 +0100 |
commit | 756a17a8480baa0e54110d32853d27460f66b235 (patch) | |
tree | 13d200c1d74181dbfb74e9930ed1098ddd7ede80 | |
parent | 76a6509c594df118c76381b821e5259f149bd93e (diff) | |
download | rneovim-756a17a8480baa0e54110d32853d27460f66b235.tar.gz rneovim-756a17a8480baa0e54110d32853d27460f66b235.tar.bz2 rneovim-756a17a8480baa0e54110d32853d27460f66b235.zip |
doco: Replace termcap with terminfo where appropriate.
Also document better what to do on slow terminals.
-rw-r--r-- | runtime/doc/eval.txt | 9 | ||||
-rw-r--r-- | runtime/doc/intro.txt | 4 | ||||
-rw-r--r-- | runtime/doc/map.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 5 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 4 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 7 | ||||
-rw-r--r-- | runtime/doc/term.txt | 42 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 2 |
8 files changed, 36 insertions, 41 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 11b42dd2e5..4d81a124cc 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1845,10 +1845,11 @@ v:t_number Value of Number type. Read-only. See: |type()| v:t_string Value of String type. Read-only. See: |type()| *v:termresponse* *termresponse-variable* -v:termresponse The escape sequence returned by the terminal for the |t_RV| - termcap entry. It is set when Vim receives an escape sequence - that starts with ESC [ or CSI and ends in a 'c', with only - digits, ';' and '.' in between. +v:termresponse The escape sequence returned by the terminal for the DA + (request primary device attributes) control sequence. It is + set when Vim receives an escape sequence that starts with ESC + [ or CSI and ends in a 'c', with only digits, ';' and '.' in + between. When this option is set, the TermResponse autocommand event is fired, so that you can react to the response from the terminal. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index c745d60ebc..88d04aa76b 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -442,8 +442,8 @@ available on a few terminals. Note: There are two codes for the delete key. 127 is the decimal ASCII value for the delete key, which is always recognized. Some delete keys send another -value, in which case this value is obtained from the termcap entry "kD". Both -values have the same effect. +value, in which case this value is obtained from the |terminfo| entry "key_dc". +Both values have the same effect. Note: The keypad keys are used in the same way as the corresponding "normal" keys. For example, <kHome> has the same effect as <Home>. If a keypad key diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 16c044a21d..f5b0233e6c 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -443,8 +443,8 @@ There are two ways to map a special key: 1. The Vi-compatible method: Map the key code. Often this is a sequence that starts with <Esc>. To enter a mapping like this you type ":map " and then you have to type CTRL-V before hitting the function key. Note that when - the key code for the key is in the termcap, it will automatically be - translated into the internal code and become the second way of mapping + the key code for the key is in the |terminfo| entry, it will automatically + be translated into the internal code and become the second way of mapping (unless the 'k' flag is included in 'cpoptions'). 2. The second method is to use the internal code for the function key. To enter such a mapping type CTRL-K and then hit the function key, or use diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 225336bae3..6254a45250 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -24,10 +24,7 @@ achieve special effects. These options come in three forms: :se[t] all Show all but terminal options. -:se[t] termcap Show all terminal options. Note that in the GUI the - key codes are not shown, because they are generated - internally and can't be changed. Changing the terminal - codes in the GUI is not useful either... +:se[t] termcap Do nothing. Nvim uses |terminfo|. *E518* *E519* :se[t] {option}? Show value of {option}. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 128c70ee94..bcbf8c365d 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -571,8 +571,8 @@ In Insert or Command-line mode: *Q_op* Options |:set| :se[t] show all modified options -|:set| :se[t] all show all non-termcap options -|:set| :se[t] termcap show all termcap options +|:set| :se[t] all show all options +|:set| :se[t] termcap Do nothing. (|terminfo|) |:set| :se[t] {option} set boolean option (switch it on), show string or number option |:set| :se[t] no{option} reset boolean option (switch it off) diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index ed2a97cb3b..f2db95ce19 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4696,7 +4696,7 @@ cterm={attr-list} *highlight-cterm* ctermfg={color-nr} *highlight-ctermfg* *E421* ctermbg={color-nr} *highlight-ctermbg* The {color-nr} argument is a color number. Its range is zero to - (not including) the number given by the termcap entry "Co". + (not including) the number of |terminfo-colors| available. The actual color with this number depends on the type of terminal and its settings. Sometimes the color also depends on the settings of "cterm". For example, on some systems "cterm=bold ctermfg=3" gives @@ -4768,9 +4768,8 @@ ctermbg={color-nr} *highlight-ctermbg* delete the "g:colors_name" variable when you don't want this. When you have set "ctermfg" or "ctermbg" for the Normal group, Vim - needs to reset the color when exiting. This is done with the "op" - termcap entry |t_op|. If this doesn't work correctly, try setting the - 't_op' option in your vimrc. + needs to reset the color when exiting. This is done with the + "orig_pair" |terminfo| entry. *E419* *E420* When Vim knows the normal foreground and background colors, "fg" and "bg" can be used as color names. This only works after setting the diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 3425fb93b4..817b06de2b 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -21,7 +21,8 @@ When Vim is started a default terminal type is assumed. for MS-DOS this is the pc terminal, for Unix an ansi terminal. *terminfo* *E557* *E558* *E559* -On Unix the terminfo database is used. +On Unix the terminfo database is used. There is no access to the terminfo +settings with |:set|. *builtin-terms* *builtin_terms* If a terminfo database is not available, Nvim will look up the terminal type @@ -65,7 +66,7 @@ genuine Xterm will not work over an SSH connection, because the environment variable, set by genuine Xterm, that it looks for is not automatically replicated over an SSH login session. - *256-color* *termcap-colors* + *256-color* *terminfo-colors* *termcap-colors* Nvim can make use of 256-colour terminals and tries to do so whereever it can. If the |terminfo| description of the terminal says that it supports fewer @@ -93,7 +94,7 @@ extension pioneered by the dtterm program. |terminfo| does not have a flag for this extension. So Nvim simply assumes that (all) "dtterm", "xterm", "teraterm", "rxvt" terminal types, and Konsole, are capable of this. - *cursor-shape* *termcap-cursor-shape* + *cursor-shape* *terminfo-cursor-shape* *termcap-cursor-shape* Nvim will adjust the shape of the cursor from a block to a line when in insert mode (or as specified by the 'guicursor' option), on terminals that support it. It uses the same |terminfo| extensions that were pioneered by tmux for @@ -167,7 +168,7 @@ On Unix systems, 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" +- from the |terminfo| entries "lines" and "columns" 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 @@ -190,30 +191,27 @@ cursor position is shown in the status line. If you are using horizontal scrolling ('wrap' option off) consider setting 'sidescroll' to a small number. -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 terminal -scrolls very slowly, set the 'scrolljump' to 5 or so. If the cursor is moved -off the screen (e.g., with "j") Vim will scroll 5 lines at a time. Another -possibility is to reduce the number of lines that Vim uses with the command -"z{height}<CR>". +If you have a slow terminal you may want to reset the 'showcmd' and 'ruler' +options. The command characters and cursor poritions will not be shown in the +status line (which involves a lot of cursor motions and attribute changes for +every keypress or movement). If the terminal scrolls very slowly, set the +'scrolljump' to 5 or so. If the cursor is moved off the screen (e.g., with +"j") Vim will scroll 5 lines at a time. Another possibility 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 second between them you might want to set the 'timeout' and/or 'ttimeout' option. See the "Options" chapter |options|. -If you are using a color terminal that is slow, use this command: > +If you are using a color terminal that is slow when displaying lines beyond +the end of a buffer, this is because Nvim is drawing the whitespace twice, in +two sets of colours and attributes. To prevent this, use this command: > hi NonText cterm=NONE ctermfg=NONE -This avoids that spaces are sent when they have different attributes. On most -terminals you can't see this anyway. - -If you are using Vim over a slow serial line, you might want to try running -Vim inside the "screen" program. Screen will optimize the terminal I/O quite -a 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 -is sent to the terminal at a time (does not work for MS-DOS). This makes the -screen updating a lot slower, making it possible to see what is happening. +This draws the spaces with the default colours and attributes, which allows the +second pass of drawing to be optimized away. Note: Although in theory the +colours of whitespace are immaterial, in practice they change the colours of +cursors and selections that cross them. This may have a visible, but minor, +effect on some UIs. ============================================================================== Using the mouse *mouse-using* diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 1941ac0972..93cf1d1b1a 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -117,7 +117,7 @@ check if the 'highlight' option contains "si". In version 3.0, this meant to invert the status line. Now it should be "sr", reverse the status line, as "si" now stands for italic! If italic is not available on your terminal, the status line is inverted anyway; you will only see this problem on terminals -that have termcap codes for italics. +that have |terminfo| capbilities for italics. ============================================================================== 3. Opening and closing a window *opening-window* *E36* |