Skip to content
Delete unwanted whitespace at the end of lines.
Latest commit 62fe08a Feb 24, 2015 Ingo Karkat committed with Version 1.06
- FIX: Warning for nomodifiable buffer does not consider buffer-local b:DeleteTrailingWhitespace_Action (after version 1.05).
Failed to load latest commit information.
autoload Version 1.06 Feb 24, 2015
doc Version 1.06 Feb 25, 2015
plugin Version 1.04 Jan 28, 2014
README Version 1.05 Dec 13, 2014


This is a mirror of

This plugin deletes whitespace at the end of each line, on demand via the
:DeleteTrailingWhitespace command, or automatically when the buffer is

This plugin leverages the superior detection and customization facilities of
the companion ShowTrailingWhitespace.vim plugin (vimscript #3966), though it
can also be used without it if you're not interested in highlighting and

To quickly locate the occurrences of trailing whitespace, you can use the
companion JumpToTrailingWhitespace.vim plugin (vimscript #3968).

The basic substitution commands as well as more elaborate scriptlets, as the
idea of automating this can be found in this VimTip:
There are already a number of plugins that define such a command; most bundle
this functionality together with the highlighting of trailing whitespace.
However, most of them cannot consider whitespace exceptions and are not as
- trailing-whitespace (vimscript #3201) defines :FixWhitespace.
- bad-whitespace (vimscript #3735) defines :EraseBadWhitespace.
- Trailer Trash (vimscript #3938) defines :Trim.
- StripWhiteSpaces (vimscript #4016) defines :StripWhiteSpaces and strips
  automatically, too, but is way more simple than this plugin.
- WhiteWash (vimscript #3920) provides functions that also can strip visible
  ^M and sequential whitespacw between words.

                        Delete all trailing whitespace in the current buffer
                        or [range].
Something went wrong with that request. Please try again.