From b29119f90d49e47bfee4c74a1fc452beb7ba134b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 16 Apr 2014 13:12:35 +1200 Subject: Strip trailing whitespace with x --- vim/vimrc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vim/vimrc') 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 t :call ToggleFormatFlag('t') endif +" Strip trailing whitespace with \x +nnoremap x + \ :let _s=@/:%s/\s\+$//e:let @/=_s:nohl + " Keep plenty of command and search history, because disk space is cheap set history=2000 -- cgit v1.2.3