On 24/08/10 13:58, Martin Braun wrote:
Hi,

using 7.2, I have the following problem:

All the 'highlight' commands in my .vimrc seem to get overridden by the
colorscheme.

I have the following commands in my .vimrc, slightly abbreviated:

colorscheme delek
highlight WhiteSpaceEOL ctermbg=darkgreen guibg=lightgreen
match WhiteSpaceEOL /\s\+$/
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/

Deleting the 'colorscheme' command helps; but of course I don't want to
use the standard one. It seems like syntax highlighting is not a
problem.

Can anyone give me some pointers how to fix this? Or do I have to make
my own colorscheme? I'd prefer not to; sometimes I switch it--but I also
think having the 'highlight' commands after the colorscheme command
should be OK.

Cheers,
MB

Most colorschemes will start by clearing all highlighting.

- If you want to set :hi colors in your vimrc, make sure that they are used _after_ the :colorscheme command

- The :match command is window-local (but continues to apply if you edit a different file in the same window).

- Don't reinvent the wheel:
  - instead of WhiteSpaceEOL, you could use:
        :set list listchars=tab:\|_,trail:<,eol:ΒΆ
                * tab: must be used if you don't want hard tabs
                displayed as ^I. What I've put here will display each
                hard tab as one | followed by zero or more _
                characters, in blue (or in whatever your colorscheme
                sets for the SpecialKey highlight group). If you want
                tabs-as-specas, use "tab:\ \ " (without the quotes).
                * trail: defines one character which will be used for
                all trailing spaces (and highlighted as SpecialKey).
                * eol: defines one character which will be used to show
                the end of the line (and highlighted as NonText). If you
                don't define one you'll get a dollar sign. If you don't
                want an explicit end-of-line marker, use a backslash-
                escaped space.
    You may feel that using both trail: and eol: is redundant.
    See :help 'listchars' for details.
- instead of OverLength, you may want to use the new 'colorcolumn' option (which, however, is new in Vim 7.3, so you would have to upgrade first).


Best regards,
Tony.
--
There can be no twisted thought without a twisted molecule.
                -- R. W. Gerard

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to