On Aug 24, 6:58 am, Martin Braun <martin.br...@kit.edu> wrote: > > All the 'highlight' commands in my .vimrc seem to get overridden by the > colorscheme. >
What do you mean, "overridden"? The groups you use below (WhiteSpaceEOL and OverLength) don't exist in any widely-distributed colorschemes that I know of (maybe I'm wrong), so they shouldn't be getting any new values from your 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.\+/ > First of all, this won't work. Your second "match" command will override the first, and it wil only take effect on the first window Vim opens. Any further windows will remain unaffected. You'd need to also run the commands on any newly created windows, maybe with WinEnter or BufWinEnter autocmds, and use matchadd() instead of just :match (or use both :match and :2match). Secondly, regarding your OverLength match...are you aware of the new ColorColumn feature in Vim 7.3? This new feature made such matches obsolete for my own use anyway. > 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. > Helps what? What happens (precisely) before you delete the colorscheme command? What did you expect? What happens after? We need a better description of the problem we're trying to solve before we can help. > 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. > I also think having the 'highlight' commands after the colorscheme should be OK. Are you sure you're not also loading the colorscheme other times? You may want to tie into the ColorScheme autocmd event to set up your highlight groups, or add something to your ~/.vim/after/colors directory to add to your chosen color scheme. -- 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