aboutsummaryrefslogtreecommitdiff
path: root/plugin/strip_trailing_whitespace.vim
blob: a20a8a14fe1677511305da21f4eba8dbbe5f9c2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"
" strip_trailing_whitespace.vim: User command to strip both horizontal and
" vertical whitespace in a buffer, with optional range, reporting both
" accurately and restoring the cursor afterwards.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_strip_trailing_whitespace') || &compatible
  finish
endif
if v:version < 700
  finish
endif
let loaded_strip_trailing_whitespace = 1

" User command for the above
command! -range=% StripTrailingWhitespace
      \ call strip_trailing_whitespace#(<line1>, <line2>)