LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't get vim colors working (https://www.linuxquestions.org/questions/linux-newbie-8/cant-get-vim-colors-working-652974/)

keyboard1973 07-02-2008 12:34 AM

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

Mr. C. 07-02-2008 01:01 AM

What is your TERM type ?

bigrigdriver 07-02-2008 01:33 AM

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

keyboard1973 07-02-2008 02:27 AM

TERM type
 
Quote:

Originally Posted by Mr. C. (Post 3201052)
What is your TERM type ?

Hello

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

Keith

Mr. C. 07-02-2008 02:41 AM

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.

keyboard1973 07-02-2008 04:01 AM

Term
 
Quote:

Originally Posted by Mr. C. (Post 3201137)
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

Mr. C. 07-02-2008 04:12 AM

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.

keyboard1973 07-03-2008 09:07 AM

Jave
 
Quote:

Originally Posted by Mr. C. (Post 3201235)
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

Mr. C. 07-03-2008 11:29 AM

You're welcome.

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


All times are GMT -5. The time now is 09:07 AM.