Skip to content

Commit 0b0331a

Browse files
committed
Add documentation
1 parent 808fe84 commit 0b0331a

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Vim plugin that removes trailing whitespace
1010
Achieved by maintaining a set of all edited lines with trailing whitespace,
1111
backed by a Splay tree where children store line number offsets.
1212

13-
*Vim support: requires Vim 8.2+*
13+
*Vim support: requires Vim 8.2+ or Neovim 0.5+*

doc/strip_trailing_whitespace.vim

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
*strip_trailing_whitespace.txt* For Vim version 8.2
2+
3+
Removes trailing whitespace from modified lines on save.
4+
5+
Some filetypes have significant trailing whitespace. An autocommand is
6+
defined in the "strip_trailing_whitespace_filetype" group that sets
7+
|b:strip_trailing_whitespace_enabled| to "0" for Markdown and diff files, and
8+
"1" for other filetypes. To disable: >
9+
autocmd! strip_trailing_whitespace_filetype
10+
11+
==============================================================================
12+
13+
*:StripTrailingWhitespace*
14+
:[range]StripTrailingWhitespace
15+
Remove trailing whitespace from [range] lines (default all
16+
lines).
17+
18+
*b:strip_trailing_whitespace_enabled*
19+
b:strip_trailing_whitespace_enabled
20+
Per-buffer boolean toggle.
21+
22+
*g:strip_trailing_whitespace_max_lines*
23+
g:strip_trailing_whitespace_max_lines
24+
Maximum number of modified lines with trailing whitespace to
25+
keep track of before falling back to stripping the entire
26+
file.
27+
The default ensures the recursion depth limit won't be hit.
28+
29+
30+
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)