From 39e8b266d018769dd6e7fd06d7d680aaa835abb1 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sun, 16 Oct 2022 01:50:55 +0200 Subject: [PATCH] vim:keys: Add mapping to strip trailing whitespace --- .config/vim/vimrc.d/40-keys.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 732426d..a0dd544 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -205,3 +205,6 @@ vnoremap utc :s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime("%F % " and ][ fw to next '[', instead of the other way around. noremap ]] ][ noremap ][ ]] + +" Strip trailing whitespace +nnoremap :silent! %s/\v\s+$//