X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/d0861b4a7cfc6fed74c1450708f5fa0267e8be69..2f233dca7b538ab4af29f2a8a1b7b7f1803da358:/.vim/after/ftplugin/mail.vim diff --git a/.vim/after/ftplugin/mail.vim b/.vim/after/ftplugin/mail.vim index 245ef06..8801197 100644 --- a/.vim/after/ftplugin/mail.vim +++ b/.vim/after/ftplugin/mail.vim @@ -1,11 +1,24 @@ setlocal textwidth=68 setlocal formatoptions-=o setlocal formatoptions-=r +setlocal formatoptions-=l setlocal formatoptions+=a setlocal formatoptions+=w +setlocal formatoptions+=n + +setlocal comments=n:> "setlocal spell +augroup tsperrorinsert + au! +augroup END +match none /\s*$/ +augroup listinsert + au! +augroup END +setlocal list + " Dynamically set format options, depending on where you are in a " mail, idea from Teemu Likonen: " http://groups.google.com/group/vim_use/msg/f59e5c1adc6be2b3 @@ -181,3 +194,5 @@ fun! DelegateCompletion(next) return "\x10" endif endfun + +autocmd BufWritePost exe 'write ' . fnameescape((exists('$TMPDIR') ? expand('$TMPDIR') : '/tmp') . '/mail.backup.' . strftime('%Y-%m-%d-%H%M%S'))