You are not logged in.

#1 2007-03-14 19:28:08

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

[Sorta Resolved]Weird VIM Colors Curiosity

I have noted the following phenomenon on my system: The colorscheme that Vim uses in X, depends on whether or not Vim is started from a login shell or from a non-login shell.
In my experience, when, in X, I start aterm or Konsole and then open a file with filetype sh syntax highlighting, this results in the following:
Case 1
Non-Login.png

From within this terminal, if I su to the same user, without the '-' option, the result is the same. However, if I su to the same user, with the '-' option, the result will look like this:
Case 2
Login.png

After su'ing with '-' option, I can subsequently su to the same user with or without the '-' option an infinite amount of times, the result will be the same as in Case 2.

P.S. Within a (non-X) F1-F6 terminal, the result is always Case 1.

I read that login shells execute /etc/profile and ~/.bash_profile. However this is not the culprit, as my .profile and .bash_profile are symlinks to .bashrc and when removing /etc/profile and ~/.bash_profile, Case 2 still occurs.
So I have no idea what is the cause of this behaviour. :/
Anyone has a clue?

Last edited by OutOfPhase (2007-03-15 17:26:20)

Offline

#2 2007-03-14 19:58:59

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [Sorta Resolved]Weird VIM Colors Curiosity

My .Xdefaults btw, nothing too flashy in here.

# Tab size = 2
XTerm*font:               -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*
XTerm*boldFont:           -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*
xfterm4*font:             -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*
xfterm4*boldFont:         -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*
Xft.antialias:            true

#Aterm*title:             aterm-main
#Aterm*name:              aterm-main
#Aterm*iconName:          aterm-main
#Aterm*transparent:       true
#Aterm*transpscrollbar:   true
Aterm*scrollBar:          false
Aterm*scrollBarfloation:  true
Aterm*scrollBarright:     true
Aterm*visualbell:         true
Aterm*loginShell:         true
aterm*foreground:         #ffffff
aterm*font:               -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*
aterm*boldfont:           -*-terminus-bold-*-*-*-17-*-*-*-*-*-*-*

Offline

#3 2007-03-14 20:11:28

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [Sorta Resolved]Weird VIM Colors Curiosity

Vim is looking for your TERM env variable.  Without a login shell, apparently this isn't getting set correctly.

Offline

#4 2007-03-14 22:21:04

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: [Sorta Resolved]Weird VIM Colors Curiosity

First shot looks like elflord theme, second like default


IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

#5 2007-03-15 17:12:23

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [Sorta Resolved]Weird VIM Colors Curiosity

My $TERM is set in both the login and non-login shell to rxvt.

After messing with set background i discovered that
:set background=dark gives me Case 1
:set background=light gives me Case 2

Although I don't know how Vim decided upon what background should be.
I could just put background=dark in my .vimrc and be done with it, I guess.

Offline

Board footer

Powered by FluxBB