striker wrote:
I am using colorscheme vo_dark. When I :set cul or use visual highlighting, the color for the highlight is light gray and makes the highlighted text very difficult to see.

The first few lines are:

let g:colors_name="VO Dark"
hi normal guifg=darkgreen guibg=black    ctermfg=darkgreen ctermbg=black
hi StatusLine guifg=darkgreen guibg=black ctermfg=darkgreen ctermbg=black hi StatusLineNC guifg=darkgreen guibg=black ctermfg=darkgreen ctermbg=black
hi VertSplit guifg=darkgreen guibg=black    ctermfg=darkgreen ctermbg=black
hi OL1 guifg=darkgreen    ctermfg=darkgreen
hi OL2 guifg=red    ctermfg=red
hi OL3 guifg=lightblue    ctermfg=lightblue
hi OL4 guifg=violet    ctermfg=magenta
hi OL5 guifg=darkgreen    ctermfg=darkgreen
hi OL6 guifg=red    ctermfg=red
hi OL7 guifg=lightblue    ctermfg=lightblue
hi OL8 guifg=violet    ctermfg=magenta
hi OL9 guifg=darkgreen    ctermfg=darkgreen

My question is this:
What do I need to look for and change in order to implement a new color for the highlighting?

The color groups are mentioned under
        :help 'cursorline'
        :help 'cursorcolumn'
        :help 'highlight'

I'm assuming that you don't want to turn the highlighting off, just change the colours.

1. Open, in Vim, your colorscheme (vo_dark.vim, which is in the "colors" subdirectory of one of the directories named in the 'runtimepath' option).

2. Using the ":saveas" command, copy it to ~/.vim/colors (for Unix) or ~/vimfiles/colors (for Windows) and give it a different filename. For instance

        :saveas ~/.vim/colors/striker-dark.vim

3. Add ":highlight" lines for the following:

        hi CursorColumn ...
        hi CursorLine ...
        hi Visual ...
        hi VisualNOS ...

(VisualNOS is used only on X11 systems but it does no harm on others) where the ... are to be replaced by one or more of the following:

        term=<mode>

where <mode> is one or more (comma-separated) of NONE reverse bold underline (etc., see ":help attr-list), defining the display mode to be used on black-and-white console terminals. AFAIK Vim has no provision for making text invisible in a monochrome text monitor.

        ctermfg=<foreground>
        ctermbg=<background>

where <foreground> and <background> are the colors to be used in color text consoles; in general, on 8-color terminals, or for the background on 8-background 16-foreground color terminals, the first 8 names mentioned under ":help term-colors" can be used. When 16 colors are usable, use the 16 names mentioned there.

        gui=<mode>
        guifg=<foreground>
        guibg=<background>

defining the highlight to be used in gvim. <mode> is as with term= above; <foreground> and <background> can take many values, some of which are mentioned under ":help gui-colors" and/or ":help win32-colors"; your system may accept more, if it has an "rgb.txt" file where it can find it (see ":help rgb.txt); and any color can be specified in hex, as #RRGGBB where RR (red), GG (green) and BB (blue) each range from 00 to FF. One of my sources says that for best portability it is best to use color components (red, green and blue) each of which is a multiple of 0x33. I pass that info (or intox) for what it's worth.

4. Then save your new colorscheme (:w) and test it (:colorscheme striker-dark).

5. Once you're satisfied with the result, replace "colorscheme vo-dark" by "colorscheme striker-dark" (or whatever) in your vimrc.


**************************************************************
Another color related question:
Can anyone tell me of a plugin or way to turn-on highlighting for a single word?

Kevin



see ":help :match". Or with 'hlsearch' on, the latest search or replace operation (actually, the contents of register / ) will have its matches highlighted. So, to highlight all occurrences of the word "word" without actually searching for them (or moving the cursor), use

        :let @/ = '\<word\>'

Notes:
1. Use single quotes, not double quotes, so that the backslashes are stored unchanged in the pattern. 2. In a pattern, \< means "start of word" and \> means "end of word". Both are zero-length pattern atoms.


Best regards,
Tony.

Reply via email to