Fix up previews

Fri, 05 May 2017 13:41:05 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 05 May 2017 13:41:05 -0400
changeset 563
c1949730cc74
parent 562
24e09b8ff36c
child 564
81f1da7a57e1

Fix up previews

.pandoc/templates/mail.html5 file | annotate | diff | comparison | revisions
.vimrc file | annotate | diff | comparison | revisions
--- a/.pandoc/templates/mail.html5
+++ b/.pandoc/templates/mail.html5
@@ -9,6 +9,6 @@
     </style>
   </head>
   <body>
-    $body$
+$body$
   </body>
 </html>
--- a/.vimrc
+++ b/.vimrc
@@ -497,9 +497,10 @@ let g:neocomplcache_filename_include_exp
 
 
 " {{{ Commands
-command! MailPreview     enew | set bt=nofile | silent exe '!mutt-md2html # > #.~htm~'
+" Preview markdown mail -- I edit with headers so I box them in a code block.
+command! MailPreview     enew | set bt=nofile | 0r # | exe 'norm 0O```<Esc>}O```' | silent exe '%!mutt-md2html > #.~htm~'
                            \ | silent exe '0r !links -dump #.~htm~' | silent exe '!rm -f #.~htm~' | 0
-command! MailPreviewHTML enew | set bt=nofile | execute '0r !mutt-md2html #' | 0
+command! MailPreviewHTML enew | set bt=nofile | 0r # | exe 'norm 0O```<Esc>}O```' | silent exe '%!mutt-md2html' | 0
 
 if !exists(":DiffOrig")
   " Diff unsaved buffer

mercurial