You are not logged in.

#1 2004-01-31 19:36:39

klo
Member
From: Slovenia
Registered: 2004-01-31
Posts: 6

vim colors

Hi everyone,
when I'm in X and use vim I can't get any colors with "syn on", I get highlighting but only bold and underline, still black & white. If I switch to a virtual terminal the colors show up.

Is this the case just on my machine? How to get colors?

Offline

#2 2004-01-31 21:15:14

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: vim colors

I have the same problem on my machine. I use emacs though, so I never really bothered to mess with it.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#3 2004-01-31 21:21:13

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: vim colors

the term type ($TERM) xterm has no colours defined.  Use xterm-color.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#4 2004-01-31 22:40:37

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: vim colors

that worked. big_smile


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#5 2004-01-31 23:06:44

klo
Member
From: Slovenia
Registered: 2004-01-31
Posts: 6

Re: vim colors

Where do I set this to affect all users? Should I simply add line
export TERM="xterm-color"
to /etc/profile?

EDIT: just tried that, doesn't work, TERM is still xterm after reboot.

Offline

#6 2004-01-31 23:35:37

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: vim colors

You have to set variable each time a terminal session is started.

I stuck it in ~/.zshrc, but that's only for my main user, not every one.

Try putting it in /etc/bashrc if you use BASH.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#7 2004-02-01 00:28:00

klo
Member
From: Slovenia
Registered: 2004-01-31
Posts: 6

Re: vim colors

No luck with /etc/bashrc, I'll just write it to ~/.bashrc, at least there it works ok.
Thanks for helping.

Offline

#8 2004-02-01 12:16:10

andy
Member
From: Germany
Registered: 2002-10-11
Posts: 374

Re: vim colors

man bash

and search for the sections INVOCATION and FILES.
Also note, that when you start an xterm just by issung "xterm" (or a corresponding window manager entry). It is not a login shell. You have to start it with

xterm -ls

to get a login shell - if that is what you want.
Also, double check how your startup files call each other for your setup.

Offline

Board footer

Powered by FluxBB