aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/strip_trailing_whitespace.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:40:20 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:45:33 +1300
commitf9e95b30a6dedb5f09ef904ae5d1993cd2d6115a (patch)
tree7703988f50a95a7d0d938ccad7f015fd9c509a10 /vim/plugin/strip_trailing_whitespace.vim
parentRemove redundant has('eval') VimL test (diff)
downloaddotfiles-f9e95b30a6dedb5f09ef904ae5d1993cd2d6115a.tar.gz
dotfiles-f9e95b30a6dedb5f09ef904ae5d1993cd2d6115a.zip
Restore some judicious \m\C hedging in Vim
These are technically not really needed, but this is more consistent with good style recommendations in the Google VimScript style guide.
Diffstat (limited to 'vim/plugin/strip_trailing_whitespace.vim')
-rw-r--r--vim/plugin/strip_trailing_whitespace.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/strip_trailing_whitespace.vim b/vim/plugin/strip_trailing_whitespace.vim
index 677e51c5..d5f5624a 100644
--- a/vim/plugin/strip_trailing_whitespace.vim
+++ b/vim/plugin/strip_trailing_whitespace.vim
@@ -30,11 +30,11 @@ function! s:StripTrailingWhitespace()
" Replace the line with a subsitution of its text stripping extraneous
" whitespace
- call setline(l:li, substitute(l:line, '\s\+$', '', 'g'))
+ call setline(l:li, substitute(l:line, '\m\C\s\+$', '', 'g'))
" If this line has any non-whitespace characters on it, update l:lw with
" its index
- if l:line =~# '\S'
+ if l:line =~# '\m\S'
let l:lw = l:li
endif