[opensuse] vi - change BASH comment color to something readable
- From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Nov 2008 21:00:32 -0600
List,
I finally took the time to find out how to change the color vi uses for BASH
comments to change them from the dark blue to something I can actually read on
the black vi background. It is a simple inclusion in your .vimrc file. I know a
lot of you already know this, but I'll post it for the rest of us.
In your home directory simply include the following line in your ~/.vimrc:
hi Comment term=bold ctermfg=lightblue guifg=lightblue
Also, remember that in bash config files the (") double-quote at the beginning
of the line is a comment so you can include a little explanation in your .vimrc
file as well. If you want to set your comment color and create the .vimrc file
all in one step, then just open konsole and type 'cd' to make sure you are in
your home directory and then just copy and paste this into konsole and hit return:
echo 'hi Comment term=bold ctermfg=lightblue guifg=lightblue' >> .vimrc
Another color I looked at and liked for the comment highlight was:
hi Comment term=bold ctermfg=darkcyan guifg=darkcyan
You can see what colors are available in vi by opening any file and then typing:
:runtime syntax/colortest.vim
The actual syntax files are in:
/usr/share/vim/current/syntax
Where current is just a symlink to the current version directory in
/usr/share/vim/ for 11.0 it is /usr/share/vim/vim71 on 11.1Beta5 it's
/usr/share/vim/vim72
Now I can read my comments again!
--
David C. Rankin, J.D.,P.E. |
Rankin Law Firm, PLLC | Countdown for openSuSE 11.1
510 Ochiltree Street | http://counter.opensuse.org/11.1/small
Nacogdoches, Texas 75961 |
Telephone: (936) 715-9333 | openSoftware und SystemEntwicklung
Facsimile: (936) 715-9339 | http://www.opensuse.org/
www.rankinlawfirm.com |
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] vi - change BASH comment color to something readable
- From: Randall R Schulz
- Re: [opensuse] vi - change BASH comment color to something readable
- Prev by Date: Re: [opensuse] Attempting (and failing) to use my UPS
- Next by Date: Re: [opensuse] Attempting (and failing) to use my UPS
- Previous by thread: [opensuse] Re: [opensuse-factory] buggy kernel update
- Next by thread: Re: [opensuse] vi - change BASH comment color to something readable
- Index(es):
Relevant Pages
|