summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-08-05 22:54:15 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-08-05 22:54:15 +0200
commit7bada22e6623e366172cfd30b70cebf6792d7373 (patch)
tree5241714c830faed3d5eb0aaaf5f32bcf77ef5b24 /vimrc
parent61ed67fdf8e4a5209796ccaa7e02aafd6ce95b5a (diff)
downloadvim-7bada22e6623e366172cfd30b70cebf6792d7373.zip
vim-7bada22e6623e366172cfd30b70cebf6792d7373.tar.gz
vimrc: add autoclean trailing spaces before writting file
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index d9c7694..cc63092 100644
--- a/vimrc
+++ b/vimrc
@@ -125,6 +125,7 @@ function! Preserve(command)
endfunction
nmap _$ :call Preserve("%s/\\s\\+$//e")<CR>
nmap _= :call Preserve("normal gg=G")<CR>
+autocmd BufWritePre * :call Preserve("%s/\\s\\+$//e")
source ~/.vim/scripts/bepo-layout.vim