vim-grammarous icon indicating copy to clipboard operation
vim-grammarous copied to clipboard

Different background colors for vim spellang and grammarous

Open francozappa opened this issue 5 years ago • 1 comments

Hi,

Is there a way to set the background color of a grammarous errors? E.g., set grammarous background to dark orange and keep the red background for spellang?

francozappa avatar Apr 09 '20 12:04 francozappa

I know I'm a year late, but in case anyone else comes across this...

You can set a highlight group for GrammarousError, which by default gets aliased to SpellBad. So, the following sets red undercurls for spelling, and green undercurls for grammar (probably need to set foreground colour to work in terminals):

augroup spellhighlighting
	autocmd!
	autocmd ColorScheme * highlight SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#FF0000
	autocmd ColorScheme * highlight GrammarousError guifg=NONE guibg=NONE gui=undercurl guisp=#00FF00
augroup END

rddunphy avatar May 11 '21 20:05 rddunphy