0

I've recently switched to Mutt, and am using vim as my main editor, which is working quite well. My only minor annoyance is that I would like to, in addition to the various highlights and such done my vim's mail filetype, also get syntax highlighting for markdown.

Google has proven not to be up to the challenge, so I was hoping I might find someone here with some further knowledge of the powers of vim.

I could just set the filetype to be markdown for /tmp/mutt*, but the mail filetype does some magic beyond merely the body of the email as far as I can tell?

1 Answer 1

1

Do you send out Markdown-formatted emails?!

It's difficult to have both Mail and Markdown formatting; you can't just "add" another syntax to an existing one. Vim allows to designate certain regions and include another syntax in there (see :help :syn-include), but I don't think that would work out well. (Unless you can ignore quoted messages and just define a region for the entire mail body.)

If you just have blocks of Markdown embedded in email messages, you can use my SyntaxRange plugin to highlight a range of lines (either by manually specifying it, or when it's delimited by certain markers). I use this to highlight diff blocks of inline patches.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .