vim/syntax/mdmail.vim @ f64186f7a65e

More
author Steve Losh <steve@stevelosh.com>
date Wed, 24 Jul 2019 12:14:28 -0400
parents (none)
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