[opensuse] vi - change BASH comment color to something readable



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



Relevant Pages

  • Re: Putty
    ... you can read the documentation for the bash shell (a Linux/ ... "www" in your home directory (if your home directory was the current ... Try 'man cd' for the man page about the 'cd' command. ...
    (uk.comp.os.linux)
  • netBeans operation
    ... I use bash and set the environment ... Could I put something in my home directory that would initialize this path ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Stupid Find Tricks
    ... >> I have a directory of symbolic links in a user's home. ... >> I am trying to find files from the user's home directory ... I've read the man pages for find and for bash numerous times. ... Mike ...
    (RedHat)
  • Re: Silly Permissions Issue
    ... bash: ./metricconv: Permission denied ... I copied the executable file to my home directory. ... > It sounds like in its original location there was a directory in the ...
    (comp.os.linux.development.apps)
  • Re: Cygwin HOME directory on Win XP
    ... Whenever I lauch Cygwin (usu. ... Cygwin thinks my HOME directory should be ... That makes bash start in your My Documents directory. ... Copy the icon from the desktop to the quick-start bar. ...
    (comp.arch.embedded)