From 48eab41d5c6cd2cc12a2fcb915aab0606302ae9b Mon Sep 17 00:00:00 2001 From: eeemsi Date: Tue, 10 Jan 2023 19:03:17 +0100 Subject: [PATCH] feat (vimrc): automatically remove trailing whitespaces --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index eb42f30..30fd094 100644 --- a/vimrc +++ b/vimrc @@ -19,3 +19,6 @@ let g:netrw_banner=0 " Tree style listing in netrw let g:netrw_liststyle = 3 +" Automatically remove trailing whitespace +autocmd! BufWrite * mark ' | silent! %s/\s\+$// | norm ' +