You are not logged in.
Pages: 1
When I issue a command like 'man foo', 'cat foo | less' or anything like that, I'd the screen to be reverted to its former state after execution. I noticed that when the environmental var TERM is "xterm", this is happening. The only problem: VIM changes its color scheme. If I use 'TERM=linux vim foo', the color fits, but the file remains on screen when I close vim.
Any ideas?
Offline
Hi,
does this behaviour show up on the virtual console or in an X session?
hightower
Offline
When I use tty the env var is set to TERM=linux. Every application, including less and vim, are sending their output directly to the console, instead of making a "new instance" - I don't really know how to call it. Anyway, Konsole sets this var to "xterm", as every X terminal emulator does.
Offline
The screen is restored only if the program that changes the screen writes to the alternative screen, and the programs will only do that if the termcap entry for the terminal advertises the ti and te capabilities (can be checked with infocmp -1Cr $TERM | egrep ':ti|:te').
As for the colors... I'm not sure what kind of problem you are having, but you could try setting TERM to xterm-256color. Vim also has an option that allows you to force Vim to try using more colors, t_Co.
Offline
Anyway, Konsole sets this var to "xterm", as every X terminal emulator does.
No they don't. Actually, setting the TERM value to xterm when it is not xterm causes most of the terminal problems people have. urxvt uses TERM=rxvt-unicode, for instance, and setting the TERM value to xterm causes numerous keys to not work, as well as some redrawing problems.
Offline
Pages: 1