change background color highlight for errors detected by pylint with ropevim and ropemode installed

StackOverflow https://stackoverflow.com/questions/3614312

  •  26-09-2019
  •  | 
  •  

Question

It changes the background to red, I can't read the text to correct the error!

How can I configure a different highlight? Does it have a setting?

Was it helpful?

Solution 2

I e-mailed the author directly and he gave me a helpful response. The highlight pyflakes uses for errors is SpellBad. He also gave me a couple of examples which I will share:

highlight SpellBad term=reverse ctermbg=1

Or for gvim users:

if has("gui_running")
    highlight SpellBad term=underline gui=undercurl guisp=Orange
endif

OTHER TIPS

I got an red background problem when a begin a string in python with " or '. After configure the spellbad options it seems like good.

highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline   

Check For Details: http://hacktux.com/vim

To see all the options for highlighting, open vim, go to normal mode and type

:highlight 

to see all the modes.

e.g.

:highlight                                                                                                                                                                       
SpecialKey     xxx term=bold ctermfg=81 guifg=Cyan
NonText        xxx term=bold ctermfg=12 gui=bold guifg=Blue
Directory      xxx term=bold ctermfg=159 guifg=Cyan
ErrorMsg       xxx term=standout ctermfg=15 ctermbg=1 guifg=White guibg=Red
IncSearch      xxx term=reverse cterm=reverse gui=reverse
Search         xxx term=reverse cterm=underline gui=underline guifg=none guibg=none
MoreMsg        xxx term=bold ctermfg=121 gui=bold guifg=SeaGreen
ModeMsg        xxx term=bold cterm=bold gui=bold
LineNr         xxx term=underline ctermfg=11 guifg=Yellow

Have you looked in the file of your colorscheme? You can look for these lines in your colorscheme file and change guibg=COLOR or ctermbg=COLOR where you see

hi Error        guibg=Firebrick2 guifg=White
hi ErrorMsg     guibg=Firebrick2 guifg=White

Now, ale exists, it's a higher level software to prevent errors from many sources.

https://github.com/w0rp/ale

ALE (Asynchronous Lint Engine) is a plugin for providing linting in NeoVim and Vim 8 while you edit your text files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top