use text_flowed, move mail settings to ftplugin

Fri, 15 Jul 2016 22:59:43 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 15 Jul 2016 22:59:43 -0400
changeset 348
d72bc8c8d6f0
parent 347
a2510f8c18cb
child 349
976c8bf0499b

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

mercurial