From 85d29d1e2989ae3ef396193f5e92043337c1a5d3 Mon Sep 17 00:00:00 2001 From: lhark Date: Wed, 30 Mar 2016 15:22:20 +0000 Subject: [PATCH] Disable trailing whitespace cleaning when working on diff files --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index 13e878e..2c29d70 100644 --- a/vimrc +++ b/vimrc @@ -427,6 +427,9 @@ if has("autocmd") endif "[Remove tabs and spaces at the end of lines]" function! DeleteTrailingTWS() + if &ft =~ 'diff' + return + end normal mb silent %s/[ \t]*$//g silent %s/\s\+$//ge