X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fsyntax%2Fnotmuch-show.vim;h=c3a98b77f62d1a58fd5a6cbcbab991671c15da01;hp=02e12e997141c30762ee8f4ac080334e47bc8022;hb=44ea57a0d10ddab514abea319c4d25ec4e36b51e;hpb=89dc64726f9a396b0a0912788e1736141968c8b3 diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim index 02e12e99..c3a98b77 100644 --- a/vim/syntax/notmuch-show.vim +++ b/vim/syntax/notmuch-show.vim @@ -1,20 +1,24 @@ " notmuch show mode syntax file -syntax region nmShowMessage start=' message{' end=' message}' contains=nmBlockStart,nmShowHeader,nmShowBody,nmShowAttachment,nmShowPart,nmBlockEnd -syntax region nmShowHeader start=' header{' end=' header}' contained contains=nmBlockStart,nmBlockEnd -syntax region nmShowBody start=' body{' end=' body}' contained contains=nmBlockStart,nmShowAttachment,nmShowPart,nmBlockEnd -syntax region nmShowAttachment start=' attachment{' end=' attachment}' contained contains=nmBlockStart,nmBlockEnd -syntax region nmShowPart start=' part{' end=' part}' contained contains=nmBlockStart,nmBlockEnd +syntax cluster nmShowMsgDesc contains=nmShowMsgDescWho,nmShowMsgDescDate,nmShowMsgDescTags +syntax match nmShowMsgDescWho /[^)]\+)/ contained +syntax match nmShowMsgDescDate / ([^)]\+[0-9]) / contained +syntax match nmShowMsgDescTags /([^)]\+)$/ contained -syntax region nmBlockStart start='^ [a-z]\+{' end='$' oneline -syntax region nmBlockEnd start='^ [a-z]\+}' end='$' oneline +syntax cluster nmShowMsgHead contains=nmShowMsgHeadKey,nmShowMsgHeadVal +syntax match nmShowMsgHeadKey /^[^:]\+: / contained +syntax match nmShowMsgHeadVal /^\([^:]\+: \)\@<=.*/ contained -highlight link nmShowMessage Error -highlight link nmShowHeader Type -highlight link nmShowBody Statement -highlight link nmShowAttachment Statement -highlight link nmShowPart String -highlight link nmBlockStart Ignore -highlight link nmBlockEnd Ignore +syntax cluster nmShowMsgBody contains=@nmShowMsgBodyMail,@nmShowMsgBodyGit +syntax include @nmShowMsgBodyMail syntax/mail.vim + +silent! syntax include @nmShowMsgBodyGit syntax/notmuch-git-diff.vim + +highlight nmShowMsgDescWho term=reverse cterm=reverse gui=reverse +highlight link nmShowMsgDescDate Type +highlight link nmShowMsgDescTags String + +highlight link nmShowMsgHeadKey Macro +"highlight link nmShowMsgHeadVal NONE highlight Folded term=reverse ctermfg=LightGrey ctermbg=Black guifg=LightGray guibg=Black