aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/strip_trailing_whitespace.vim10
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/plugin/strip_trailing_whitespace.vim b/vim/plugin/strip_trailing_whitespace.vim
index cc2554bd..6a83eb53 100644
--- a/vim/plugin/strip_trailing_whitespace.vim
+++ b/vim/plugin/strip_trailing_whitespace.vim
@@ -1,4 +1,5 @@
-" Strip trailing whitespace with \x in the whole document
+" User-defined key mapping to strip trailing whitespace in the whole document
+" Suggested mapping: <leader>\x
if has('eval')
" Define function for stripping whitespace
@@ -51,7 +52,8 @@ if has('eval')
endif
endfunction
- " Map \x to the function just defined
- nnoremap <silent> <leader>x :<C-U>call <SID>StripTrailingWhitespace()<CR>
-
+ " Create mapping proxy to the function just defined
+ " Suggested mapping: <leader>x
+ noremap <Plug>StripTrailingWhitespace
+ \ :<C-U>call <SID>StripTrailingWhitespace()<CR>
endif