Miroslav Trninic
Miroslav Trninic

Reputation: 3451

vim editor error color

I am using Vim 7.3 on Ubuntu. Problem is - whenever I got some error in my code, that error is marked with white color. I can't see anything underneath that color. So if I have typo error (missing one brace) it will mark that brace with white, but I wont be able to see that mistake ( it is covered with color ). Sometimes it marks all line. I am using Molokai color scheme.

I tried to change color scheme, but nothing happens. I suppose that error color is coming from the vim native settings.

Any ideas how to fix this?

Upvotes: 8

Views: 6585

Answers (2)

Freedom_Ben
Freedom_Ben

Reputation: 11953

If highlighting is the issue, then you can easily and quickly turn off all highlighting by typing ":noh" (without the quotes) from command mode. This will temporarily turn off highlighting. This also works for getting rid of highlighting after a search (which really annoys me because like your problem here, I can't read the text when it's highlighted).

If you haven't already, you should create a file in your home directory named ".vimrc", so pathing it out would be "~/.vimrc". This is the what @mtk is referring to (just in case you don't know that already. Some people at work use Vim but don't know about the .vimrc file).

Upvotes: 1

Ingo Karkat
Ingo Karkat

Reputation: 172748

The

:hi

command lists all defined highlightings. Find the one with the white color (for errors, this should be Error), and change it (see :help :highlight) in your ~/.vimrc, e.g.:

:hi Error ctermfg=Red guifg=Red

Upvotes: 15

Related Questions