~gpanders/dotfiles

ref: 8bbb6b42ada8c7e573ffba9c35b376dd6bec1d15 dotfiles/vim/.vim/plugin/strip_trailing_whitespace.vim -rw-r--r-- 587 bytes
8bbb6b42Greg Anders Move weechat config directory to .config/weechat 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
" 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('g:loaded_strip_trailing_whitespace') || &compatible
  finish
endif
if !has('user_commands') || v:version < 600
  finish
endif
let g:loaded_strip_trailing_whitespace = 1

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