aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 50d36e91..768a86c2 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -175,6 +175,10 @@ if has('eval')
nnoremap <silent> <leader>t :<C-U>call ToggleFormatFlag('t')<CR>
endif
+" Strip trailing whitespace with \x
+nnoremap <silent> <leader>x
+ \ :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
+
" Keep plenty of command and search history, because disk space is cheap
set history=2000