Do not remove trailing whitespaces if the file is a diff
This commit is contained in:
parent
fced85576c
commit
92702dee8f
@ -52,6 +52,8 @@ set mouse=a
|
|||||||
set list
|
set list
|
||||||
set listchars=tab:――,space:·,trail:·
|
set listchars=tab:――,space:·,trail:·
|
||||||
|
|
||||||
|
let g:NoClean = ["diff"]
|
||||||
|
|
||||||
autocmd BufRead,BufNewFile
|
autocmd BufRead,BufNewFile
|
||||||
\ *.cs,
|
\ *.cs,
|
||||||
\*.java
|
\*.java
|
||||||
@ -105,6 +107,7 @@ endfunction
|
|||||||
|
|
||||||
function Writeable()
|
function Writeable()
|
||||||
return &buftype == ''
|
return &buftype == ''
|
||||||
|
\ && index(g:NoClean, &filetype) == -1
|
||||||
\ && !&readonly
|
\ && !&readonly
|
||||||
\ && &modifiable
|
\ && &modifiable
|
||||||
\ && &modified
|
\ && &modified
|
||||||
|
Loading…
Reference in New Issue
Block a user