diff options
Diffstat (limited to 'runtime/doc/tips.txt')
-rw-r--r-- | runtime/doc/tips.txt | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index e8dfbaea0b..05d080280c 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -15,7 +15,6 @@ Don't forget to browse the user manual, it also contains lots of useful tips Editing C programs |C-editing| Finding where identifiers are used |ident-search| -Switching screens in an xterm |xterm-screens| Scrolling in Insert mode |scroll-insert| Smooth scrolling |scroll-smooth| Correcting common typing mistakes |type-mistakes| @@ -119,48 +118,6 @@ archive file on your closest gnu-ftp-mirror). [the idea for this comes from Andreas Kutschera] ============================================================================== -Switching screens in an xterm *xterm-screens* *xterm-save-screen* - -(From comp.editors, by Juergen Weigert, in reply to a question) - -:> Another question is that after exiting vim, the screen is left as it -:> was, i.e. the contents of the file I was viewing (editing) was left on -:> the screen. The output from my previous like "ls" were lost, -:> ie. no longer in the scrolling buffer. I know that there is a way to -:> restore the screen after exiting vim or other vi like editors, -:> I just don't know how. Helps are appreciated. Thanks. -: -:I imagine someone else can answer this. I assume though that vim and vi do -:the same thing as each other for a given xterm setup. - -They not necessarily do the same thing, as this may be a termcap vs. -terminfo problem. You should be aware that there are two databases for -describing attributes of a particular type of terminal: termcap and -terminfo. This can cause differences when the entries differ AND when of -the programs in question one uses terminfo and the other uses termcap -(also see |+terminfo|). - -In your particular problem, you are looking for the control sequences -^[[?47h and ^[[?47l. These switch between xterms alternate and main screen -buffer. As a quick workaround a command sequence like > - echo -n "^[[?47h"; vim ... ; echo -n "^[[?47l" -may do what you want. (My notation ^[ means the ESC character, further down -you'll see that the databases use \E instead). - -On startup, vim echoes the value of the termcap variable ti (terminfo: -smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus -these two variables are the correct place where the above mentioned control -sequences should go. - -Compare your xterm termcap entry (found in /etc/termcap) with your xterm -terminfo entry (retrieved with "infocmp -C xterm"). Both should contain -entries similar to: > - :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h: - -PS: If you find any difference, someone (your sysadmin?) should better check - the complete termcap and terminfo database for consistency. - -============================================================================== Scrolling in Insert mode *scroll-insert* If you are in insert mode and you want to see something that is just off the |