LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2008, 01:34 AM   #1
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Rep: Reputation: 15
Can't get vim colors working


Hello,

I am running Centos 5 which has

vim-enhanced-7.0.109-3.el5.3
vim-minimal-7.0.109-3.el5.3
vim-common-7.0.109-3.el5.3

VIM - Vi IMproved
version 7.0.237

I am trying to get the color syntax working so I can use different color scheme's for my config files when editing them. I have tried various things I found on google and here but no go yet. I did not have a .vimrc file in my home directory so I created on with an example I found that did not work so I deleted it. When I press shift : I type syntax on and the dark white text or it may be light gray turns bright white, only one color. I am not sure how to change this, I also downloaded a color scheme I would like to use. Any suggestions or help would be appreciated.

Thanks again,

Keith
 
Old 07-02-2008, 02:01 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
What is your TERM type ?
 
Old 07-02-2008, 02:33 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
The vim color schemes are located in /usr/share/vim/vim71/colors/.

So, using a .vimrc, try the color schemes, one after another, until you find one you like. Or copy one to another name, and edit it to your liking.

My .vimrc:
Quote:
syntax on

:colorscheme zombie
"
:set vim tab spacing
:set expandtab
:set softtabstop=3
:set tabstop=3
:set shiftwidth=3
:set foldmethod=indent
:set backspace=2
:set ruler
:set number
:set digraph
:set nobackup
:set nowritebackup
 
Old 07-02-2008, 03:27 AM   #4
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
TERM type

Quote:
Originally Posted by Mr. C. View Post
What is your TERM type ?
Hello

I was able to locate my TERM type, its vt100.

Keith
 
Old 07-02-2008, 03:41 AM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
A standard vt100 only has 2 colors - background and foreground.

Try setting your term type to xterm. You may need to set your terminal emulator type as well.
 
Old 07-02-2008, 05:01 AM   #6
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Term

Quote:
Originally Posted by Mr. C. View Post
A standard vt100 only has 2 colors - background and foreground.

Try setting your term type to xterm. You may need to set your terminal emulator type as well.

Hi Mr C.

That was it, thanks a great deal, I have the TERM set to linux right now. I have one other question not related to this. I set up my DIR_COLORS so I have different colors set. I am running Centos 5 and my friend has Debian. His dir colors were different shades of color then mine when he is ssh'd into his box. He gave me his dircolors file from his Debian box, I put it in my home dir and backed up my DIR_COLORS and renamed his file to DIR_COLORS, trying to replace mine. I still have the same shades of color, we have the same colors set for the same thing only they are different shades. Could you explain to me why they are different?

Thanks again,

Keith
 
Old 07-02-2008, 05:12 AM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
The colors are defined by both DIR_COLORS and the terminal emulator. The terminal emulator follows a standard, like ANSI. The ANSI colors are simply specified as color 0=black, color 1=red, ... color 7=white.

The color red on the host means a certain set of RGB values, but the client terminal emulator can set the actual color displayed to anything. For example. in SecureCRT, there is a palette of colors that represent the standard 8 colors, plus the additional 8 bold variants. Color 0 is by default black - but I can change the actual color to be red.
 
Old 07-03-2008, 10:07 AM   #8
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Jave

Quote:
Originally Posted by Mr. C. View Post
The colors are defined by both DIR_COLORS and the terminal emulator. The terminal emulator follows a standard, like ANSI. The ANSI colors are simply specified as color 0=black, color 1=red, ... color 7=white.

The color red on the host means a certain set of RGB values, but the client terminal emulator can set the actual color displayed to anything. For example. in SecureCRT, there is a palette of colors that represent the standard 8 colors, plus the additional 8 bold variants. Color 0 is by default black - but I can change the actual color to be red.

Thanks again Mr C.!! that worked just as explained, I didn't realize you could alter the colors in the crt as well. I have been reading through the help files to get a better understanding of the application. I wanted to ask you if you would be able to help me troubleshoot my Java when I get back after the weekend. I have tried to uninstall, reinstall put a symbolic link in the firefox plugin directory, all the plugin directories I could find for mozilla and firefox. When I do a test it states java is installed and working. The issue I am having when I try it on www.pogo.com the site says I have to install java but when I test it on their site it states jave is installed and working. I don't get it?

Thanks again,

Keith
 
Old 07-03-2008, 12:29 PM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
You're welcome.

Post your questions in the appropriate forum, and certainly someone will help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vim colors not working as root but okay in normal logins robinhood1995 Linux - Software 5 07-01-2007 08:31 PM
vim colors AndeAnderson Linux - Software 3 03-09-2007 07:41 AM
vim colors fw12 Linux - General 5 07-03-2006 12:49 AM
regarding colors in vim and emacs pranith Linux - Newbie 0 02-10-2005 04:10 AM
vim colors Erik Thorsson Debian 1 02-09-2005 10:38 AM


All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration