# HG changeset patch # User Meredith Howard # Date 1468637983 14400 # Node ID d72bc8c8d6f05c0e53dda27036ba232e3aa14c09 # Parent a2510f8c18cbeebbdbe41e9098bfe3caa3afa2e0 use text_flowed, move mail settings to ftplugin diff --git a/.muttrc b/.muttrc --- a/.muttrc +++ b/.muttrc @@ -28,9 +28,10 @@ set mailcap_path = ~/.mutt/mailcap set assumed_charset = "utf-8:iso8859-1" set autoedit = yes set edit_headers = yes -set editor = "exec vim +'set tw=72 spell' +/^$ +noh ++1" +set editor = "exec vim" set strict_threads = yes +set text_flowed = yes set reverse_name = yes set envelope_from = yes set fast_reply = yes diff --git a/.vim/ftplugin/mail.vim b/.vim/ftplugin/mail.vim new file mode 100644 --- /dev/null +++ b/.vim/ftplugin/mail.vim @@ -0,0 +1,17 @@ +function IsReply() + if line('$') > 1 + :/^$/ + :noh + :+1 + endif +endfunction + +augroup mail_filetype + autocmd! + autocmd VimEnter /tmp/mutt* :call IsReply() + autocmd VimEnter /tmp/mutt* :exe 'startinsert' +augroup END + +setl textwidth=72 +setl formatoptions=awn +setl spell