vim/syntax/mdmail.vim @ 13ec2c64c7a6

More
author Steve Losh <steve@stevelosh.com>
date Wed, 17 Jun 2020 12:29:36 -0400
parents f64186f7a65e
children (none)
if exists("b:current_syntax")
  finish
endif
let s:cpo_save = &cpo
set cpo&vim

" Start with the mail syntax as a base.
runtime! syntax/mail.vim
unlet b:current_syntax

" Headers are up to the first blank line.  Everything after that up to my
" signature is the body, which we'll highlight as Markdown.
syn include @markdownBody syntax/markdown.vim
syn region markdownMailBody start="^$" end="\(^-- $\)\@=" contains=@markdownBody

" The signature starts at the magic line and ends at the end of the file.
syn region mailSignature start="^-- $" end="\%$"
hi def link mailSignature Comment

let b:current_syntax = "mdmail"
let &cpo = s:cpo_save
unlet s:cpo_save