I am wondering how to change the red background color for errors in the Xoria 256 color scheme for VIM. I just can not seem to find which part to change.

The only way I can get the red background hi light to go away is if I go into my .vimrc and comment out:

au BufWinLeave * silent! mkview
au BufWinEnter * silent! loadview
set spell 

These are the 3 .vimrc settings that are triggering the red backgrounds making certain words look like errors. I now know it is not the Xoria256 theme that is causing this because it still happens even when I comment out:

color xoria256 

Its so strange. Any ideas on how to fix this?


Most colorschemes (look for Xoria256.vim in the colors folder) can be edited to revise the colors used.

In this specific case find the line

highlight Error guifg=ColorName guibg=ColorName

Substitute the existing ColorName(s) with the colors you desire. guifg is foreground(text) and guibg is the background color. If you use vim from a terminal look for and change the corresponding ctermfg=ColorName and ctermbg=ColorName.

See a site such as this one http://www.w3schools.com/html/html_colornames.asp to find the official colornames.

  • I hear what your saying and tried it but to no avail. Problem still persists. I dud further investigating and added my findings to my original question under UPDATE. Thanks. – classer Jul 23 '10 at 12:48
  • Your changes seem to indicate a spell checking condition. It (whatever your spellchecker plugin is) probably has colors specified in it, too, that can be set in a similar way. Look at your plugins that load on startup to indicate which controls spell checking and look for similar statements as before. It probably has its own statement class names, maybe not using Error, but you might find out which by looking for the bg values that seem Red. – wbogacz Jul 23 '10 at 13:33
  • My previous comment forgot to say, if this is spell checking, the base colors really have nothing to do with the problem. Your original color changes to xoria256.vim can be undone. – wbogacz Jul 23 '10 at 13:35
  • I see that I have the spell check plug in load but I can not find the file responsiable for this error styling under the spell check folder in my vim72 folder. strange. – classer Jul 25 '10 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.