Disable trailing whitespace cleaning when working on diff files
This commit is contained in:
parent
b3788b78a4
commit
85d29d1e29
1 changed files with 3 additions and 0 deletions
3
vimrc
3
vimrc
|
@ -427,6 +427,9 @@ if has("autocmd")
|
||||||
endif
|
endif
|
||||||
"[Remove tabs and spaces at the end of lines]"
|
"[Remove tabs and spaces at the end of lines]"
|
||||||
function! DeleteTrailingTWS()
|
function! DeleteTrailingTWS()
|
||||||
|
if &ft =~ 'diff'
|
||||||
|
return
|
||||||
|
end
|
||||||
normal mb
|
normal mb
|
||||||
silent %s/[ \t]*$//g
|
silent %s/[ \t]*$//g
|
||||||
silent %s/\s\+$//ge
|
silent %s/\s\+$//ge
|
||||||
|
|
Loading…
Reference in a new issue