On 22/10/08 02:47, bill lam wrote:
> On Tue, 21 Oct 2008, Roberto Miura Honji wrote:
>
>> How can I to identify if I'm using vim on konsole or xterm?
>> For example, I would like set background=light on the konsole and dark on the
>> xterm.
> Try something like this, it matches any name starts with "xterm"
>    if (&term =~ "xterm")
>    set background=dark
>    endif
>
> But I think that you cannot actually change background with this
> command because it only provides hint to vim.
>

The problem is that konsole also sets $TERM to 'xterm' by default. I 
don't have the problem since actually I don't run xterm -- I have 
several sessions in a single konsole window (with $TERM='xterm', black 
on light yellow, 'background' correcly guessed as "dark") and, of 
course, the six "virtual" text consoles (/dev/tty1 to /dev/tty6, 
$TERM='linux', light grey on black, 'background' correctly guessed as 
"light").

Roberto, did you check whether Vim doesn't guess 'bg' correctly on your 
system too? (what does ":set bg&", followed by ":set bg?" as a different 
line, answer on konsole? on xterm?)


Best regards,
Tony.
-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to