I have some code in my
~/.vimrc to highlight trailing whitespace.
" Highlight trailing whitespace hi TrailingWhitespace ctermbg=red guibg=red matchadd("TrailingWhitespace", '\v\s+$')
I only want to see trailing whitespace when I am in normal mode, not when I am in insert mode.
How can I accomplish that highlighting only occurs in normal mode?