From d64a7405e3bbfcb10cef99eb2795130504bce3ae Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 31 May 2018 13:48:06 +1200 Subject: Initial commit Copied with minimal changes from tejr's dotfiles suite, v0.36.0. --- doc/strip_trailing_whitespace.txt | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/strip_trailing_whitespace.txt (limited to 'doc/strip_trailing_whitespace.txt') diff --git a/doc/strip_trailing_whitespace.txt b/doc/strip_trailing_whitespace.txt new file mode 100644 index 0000000..3e1807b --- /dev/null +++ b/doc/strip_trailing_whitespace.txt @@ -0,0 +1,54 @@ +*strip_trailing_whitespace.txt* For Vim version 6.0 Last change: 2018 May 31 + +DESCRIPTION *strip_trailing_whitespace* + +This plugin provides a mapping target and an optional custom command with the +author's approach to stripping trailing whitespace from an entire buffer, +including removing empty or whitespace-only lines at the end of the buffer, +without making command noise and without moving the cursor from its current +position. + +This is a very commonly written and implemented plugin, but I wrote my own +because I could not find a plugin that did this in exactly the way I wanted: + +- Provide a || mapping +- Provide a user command to do the stripping as well if wanted +- Strip trailing lines as well as trailing spaces +- Work with even very old Vim (>=6.0) +- Work with a single |undo| +- Don't move the cursor +- Don't change the search pattern +- Don't emit output +- Don't define an |autocmd| +- Don't force a key mapping +- Don't define a global function + +REQUIREMENTS *strip_trailing_whitespace-requirements* + +This plugin is only available if 'compatible' is not set. + +COMMANDS *strip_trailing_whitespace-commands* + + *:StripTrailingWhitespace* +The plugin provides a single `:StripTrailingWhitespace` command if Vim has the +|+user_commands| feature, but this is not required. It operates on the entire +buffer, and accepts neither a range nor arguments. + +MAPPINGS *strip_trailing_whitespace-mappings* + + *StripTrailingWhitespace* +The single mapping target provided is |StripTrailingWhitespace|, +mappable in any mode. There is no default key mapping to the target; you +should define this yourself in your |vimrc|. For example: +> + :nmap x StripTrailingWhitespace +< +AUTHOR *strip_trailing_whitespace-author* + +Written and maintained by Tom Ryder . + +LICENSE *strip_trailing_whitespace-license* + +Licensed for distribution under the same terms as Vim itself (see |license|). + + vim:tw=78:ts=8:ft=help:norl: -- cgit v1.2.3