Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
axelf4 committed Mar 22, 2020
1 parent 808fe84 commit 0b0331a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Vim plugin that removes trailing whitespace
Achieved by maintaining a set of all edited lines with trailing whitespace,
backed by a Splay tree where children store line number offsets.

*Vim support: requires Vim 8.2+*
*Vim support: requires Vim 8.2+ or Neovim 0.5+*
30 changes: 30 additions & 0 deletions doc/strip_trailing_whitespace.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
*strip_trailing_whitespace.txt* For Vim version 8.2

Removes trailing whitespace from modified lines on save.

Some filetypes have significant trailing whitespace. An autocommand is
defined in the "strip_trailing_whitespace_filetype" group that sets
|b:strip_trailing_whitespace_enabled| to "0" for Markdown and diff files, and
"1" for other filetypes. To disable: >
autocmd! strip_trailing_whitespace_filetype
==============================================================================

*:StripTrailingWhitespace*
:[range]StripTrailingWhitespace
Remove trailing whitespace from [range] lines (default all
lines).

*b:strip_trailing_whitespace_enabled*
b:strip_trailing_whitespace_enabled
Per-buffer boolean toggle.

*g:strip_trailing_whitespace_max_lines*
g:strip_trailing_whitespace_max_lines
Maximum number of modified lines with trailing whitespace to
keep track of before falling back to stripping the entire
file.
The default ensures the recursion depth limit won't be hit.


vim:tw=78:ts=8:noet:ft=help:norl:

0 comments on commit 0b0331a

Please sign in to comment.