495 |
495 |
496 " }}} |
496 " }}} |
497 |
497 |
498 |
498 |
499 " {{{ Commands |
499 " {{{ Commands |
500 command! MailPreview enew | set bt=nofile | silent exe '!mutt-md2html # > #.~htm~' |
500 " Preview markdown mail -- I edit with headers so I box them in a code block. |
|
501 command! MailPreview enew | set bt=nofile | 0r # | exe 'norm 0O```<Esc>}O```' | silent exe '%!mutt-md2html > #.~htm~' |
501 \ | silent exe '0r !links -dump #.~htm~' | silent exe '!rm -f #.~htm~' | 0 |
502 \ | silent exe '0r !links -dump #.~htm~' | silent exe '!rm -f #.~htm~' | 0 |
502 command! MailPreviewHTML enew | set bt=nofile | execute '0r !mutt-md2html #' | 0 |
503 command! MailPreviewHTML enew | set bt=nofile | 0r # | exe 'norm 0O```<Esc>}O```' | silent exe '%!mutt-md2html' | 0 |
503 |
504 |
504 if !exists(":DiffOrig") |
505 if !exists(":DiffOrig") |
505 " Diff unsaved buffer |
506 " Diff unsaved buffer |
506 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis |
507 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis |
507 \ | wincmd p | diffthis |
508 \ | wincmd p | diffthis |