Usually, trailing whitespace is undesirable. Using vim’s :match command, you can easily highlight trailing whitespace:
:match Error /s+$/
This can be combined with autocmd and inserted into ~/.vimrc to highlight trailing whitespace only for certain files:
autocmd FileType python match Error /s+$/
Hey Guy!!
Thanks for the great tip. What is the way to “undo” the command, so that highlighting of such cases is stopped that doesn’t involve resetting vim?
Try
:match none. You can read more on the match command using:help :match.