Click to See Complete Forum and Search --> : Vim color problems
Rakeswell
04-03-2001, 02:45 PM
I've been trying out Vim and I like it quite a bit, however, the syntax function uses colors that make it almost impossible to read some of the text.
To fix that, I've been trying to change the backround, using the :set background=dark command, but this never changes anything.
Does anyone have an idea to get that to work, or at least make it so that the syntax function uses colors that are readable?
Thanks.
knute
04-03-2001, 03:44 PM
If you are using vim from a terminal emulator in X, you could adjust the colors that the emulator is using to be more readable.
From CLI, I know that there is a way to adjust the colors, I just never have. I know that isn't a big help, :( but at least you know it's possible. :)
Rakeswell
04-03-2001, 04:17 PM
Thanks, for the info. BTW, its not running in a terminal...
What is CLI?
bdg1983
04-03-2001, 04:40 PM
CLI? Command Line Interface
I have never used VIM. Does it have a configuration file? ie. vim.conf ? Could be then possible to change the colors.
Rakeswell
04-04-2001, 02:03 AM
I knew I'd feel stupid asking what was meant by CLI -- but now I know!
I'm not sure abou the config file. I'll poke around, but I'd guess that the coloring is written into the code, as the color changes depending on the syntax. I tried using Emacs as well, but the syntax coloring is sometimes just plain unreadable as well...
What text editor do all you Linux programmers use?
bdg1983
04-04-2001, 06:21 AM
Most start off with 'vi'.
If you are using KDE/Gnome etc., there should be all kinds of text editors including programming specific ones.
carwyn
04-04-2001, 06:26 AM
Vim has two sets of colours it uses for syntax highlighting, for dark and light backgrounds respectively.
Just add
set bg=light
to your ~/.gvimrc (or maybe ~/.vimrc) file.
That worked for me anyway :)
bdg1983
04-04-2001, 09:28 AM
carwyn's suggestion sounds good.
Saw a article at LinuxGazette just in case.
http://www.linuxgazette.com/issue65/padala.html
Gnu/Vince
04-04-2001, 09:35 AM
Check the file /usr/share/vim/vim56/syntax/synload.vim
There's a section with syntax for dark and non-dark terminals. Just copy everything from dark into non-dark
Rakeswell
04-04-2001, 10:34 AM
Thanks everyone -- you guys rock!