comparison runtime/doc/tips.txt @ 236:4707450c2b33

updated for version 7.0066
author vimboss
date Fri, 15 Apr 2005 21:00:38 +0000
parents 8c60f65311fa
children c8fd241d3cdd
comparison
equal deleted inserted replaced
235:23d380e32c95 236:4707450c2b33
1 *tips.txt* For Vim version 7.0aa. Last change: 2005 Feb 23 1 *tips.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
127 : 127 :
128 :I imagine someone else can answer this. I assume though that vim and vi do 128 :I imagine someone else can answer this. I assume though that vim and vi do
129 :the same thing as each other for a given xterm setup. 129 :the same thing as each other for a given xterm setup.
130 130
131 They not necessarily do the same thing, as this may be a termcap vs. 131 They not necessarily do the same thing, as this may be a termcap vs.
132 terminfo problem. You should be aware that there are two databases for 132 terminfo problem. You should be aware that there are two databases for
133 describing attributes of a particular type of terminal: termcap and 133 describing attributes of a particular type of terminal: termcap and
134 terminfo. This can cause differences when the entries differ AND when of 134 terminfo. This can cause differences when the entries differ AND when of
135 the programs in question one uses terminfo and the other uses termcap 135 the programs in question one uses terminfo and the other uses termcap
136 (also see |+terminfo|). 136 (also see |+terminfo|).
137 137
138 In your particular problem, you are looking for the control sequences 138 In your particular problem, you are looking for the control sequences
139 ^[[?47h and ^[[?47l. These switch between xterms alternate and main screen 139 ^[[?47h and ^[[?47l. These switch between xterms alternate and main screen
140 buffer. As a quick workaround a command sequence like > 140 buffer. As a quick workaround a command sequence like >
141 echo -n "^[[?47h"; vim ... ; echo -n "^[[?47l" 141 echo -n "^[[?47h"; vim ... ; echo -n "^[[?47l"
142 may do what you want. (My notation ^[ means the ESC character, further down 142 may do what you want. (My notation ^[ means the ESC character, further down
143 you'll see that the databases use \E instead). 143 you'll see that the databases use \E instead).
144 144
145 On startup, vim echoes the value of the termcap variable ti (terminfo: 145 On startup, vim echoes the value of the termcap variable ti (terminfo:
146 smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus 146 smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus
147 these two variables are the correct place where the above mentioned control 147 these two variables are the correct place where the above mentioned control
148 sequences should go. 148 sequences should go.
149 149
150 Compare your xterm termcap entry (found in /etc/termcap) with your xterm 150 Compare your xterm termcap entry (found in /etc/termcap) with your xterm
151 terminfo entry (retrieved with /usr/5bin/infocmp -C xterm). Both should 151 terminfo entry (retrieved with /usr/5bin/infocmp -C xterm). Both should
152 contain entries similar to: > 152 contain entries similar to: >
153 :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h: 153 :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:
154 154
155 PS: If you find any difference, someone (your sysadmin?) should better check 155 PS: If you find any difference, someone (your sysadmin?) should better check
156 the complete termcap and terminfo database for consistency. 156 the complete termcap and terminfo database for consistency.
337 :let m = m . "5lDJ" " put text after bullet 337 :let m = m . "5lDJ" " put text after bullet
338 :execute m |" define the mapping 338 :execute m |" define the mapping
339 339
340 (<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not 340 (<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not
341 CTRL-W. You can copy/paste this into Vim if '<' is not included in 341 CTRL-W. You can copy/paste this into Vim if '<' is not included in
342 'cpoptions') 342 'cpoptions'.)
343 343
344 Note that the last comment starts with |", because the ":execute" command 344 Note that the last comment starts with |", because the ":execute" command
345 doesn't accept a comment directly. 345 doesn't accept a comment directly.
346 346
347 You also need to set 'textwidth' to a non-zero value, e.g., > 347 You also need to set 'textwidth' to a non-zero value, e.g., >