aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 1e72fd60e09eda0a9e356b3e3470fc31b66f9182 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
strip\_trailing\_whitespace.vim
===============================

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 `<Plug>` mapping
- Strip trailing lines as well as trailing spaces
- Accurately report what was changed
- 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 define an `autocmd`
- Don't define a user command
- Don't force a key mapping
- Don't define a global function

License
-------

Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself.
See `:help license`.

[1]: https://sanctum.geek.nz/