Fri, 15 Jul 2016 22:59:43 -0400
use text_flowed, move mail settings to ftplugin
.muttrc | file | annotate | diff | comparison | revisions | |
.vim/ftplugin/mail.vim | file | annotate | diff | comparison | revisions |
--- 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
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