sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

bad-whitespace : Highlights whitespace at the end of lines, only in modifiable buffers

 script karma  Rating 9/6, Downloaded by 875    Comments, bugs, improvements  Vim wiki

created by
Bit Connor
script type
Get the latest version at:

Inspired by the trailing-whitespace vimscript #3201

Additional References:

About ~

This plugin highlights whitespace at the end of lines with a red color.

You can erase the bad whitespace with the command |EraseBadWhitespace|

You can manually toggle the highlighting for the current buffer with the
commands |ShowBadWhitespace| |HideBadWhitespace| |ToggleBadWhitespace|

This plugin is better than using the builtin vim 'list' command because it
doesn't show an annoying highlight while you are typing in insert mode at the
end of a line.

This plugin is better than competing plugins because it doesn't show
highlighting in buffers that are not modifiable, which is usually what you
want. This makes it compatible with UI buffers that happen to contain bad
whitespace, such as the quickfix window, or the fugitive plugin.
install details
Install with pathogen or Vundle.

Manual install: Copy bad-whitespace.vim in to ~/.vim/plugin and bad-whitespace.txt in to ~/.vim/doc

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-bad-whitespace-0.3.tar.gz 0.3 2012-07-29 7.0 Bit Connor Allow color overriding
Allow reloading of the script
vim-bad-whitespace-0.2.tar.gz 0.2 2011-09-07 7.0 Bit Connor Update docs
vim-bad-whitespace-0.1.tar.gz 0.1 2011-09-07 7.0 Bit Connor Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo