I have this problem identifying the reason word get this annoying red background in my vim:
Do you happen to know why vim highlights random words throughout documents that I open and how I can turn this off?
If you want to avoid this in an apache . conf file like I did, you can add it to the end, like "# vim: nospell". Or, you could add words to spelling dictionary. I have to do set nospell , every time that red happens!
Similarly, errors are generally highlighted in red color and it looks like vim does not know how the syntax should be handled for /etc/sysconfig/named . However, highlighting of error messages is done with the help of Error and ErrorMsg highlight groups. So try to highlight groups as shown below.
Most filetypes (like python) in Vim come with a syntax that defines highlight groups (see them via :highlight ). A colorscheme then provides combinations of foreground / background color and/or formatting like bold and italic, for terminals, color terminals, and/or GVIM.
You have the spell check switched on. Switch it off using
:set nospell
(source: http://www.linux.com/learn/tutorials/357267-using-spell-checking-in-vim)
Disabling highlighting is not always something you really want to do. Instead, you can change the style of your error, so they become more friendly. Put this after setting any style:
" Any other stuff like setting colorscheme " colorscheme distinguished " Change style of highlighting hi clear SpellBad hi SpellBad cterm=underline
As a result, your errors will be underlined in not-annoying way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With