X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fsyntax%2Fnotmuch-show.vim;h=20c6b88feaa4a172c7f0b980126e013ba5de8685;hp=06dd2ea2a262d1e45e535184242b45b13c2d08d7;hb=010eac8b434eee317b0d28eac9bcf544fc6994d1;hpb=3493ea0ed5bd20b961aafa01eeddaf8cbc49b52f diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim index 06dd2ea2..20c6b88f 100644 --- a/vim/syntax/notmuch-show.vim +++ b/vim/syntax/notmuch-show.vim @@ -1,13 +1,23 @@ " notmuch show mode syntax file -syntax region nmShowMessage start=" message{" end=" message}" contains=nmShowHeader,nmShowBody,nmShowAttachment,nmShowPart -syntax region nmShowHeader start=" header{" end=" header}" contained -syntax region nmShowBody start=" body{" end=" body}" contained contains=nmShowAttachment,nmShowPart -syntax region nmShowAttachment start=" attachment{" end=" attachment}" contained -syntax region nmShowPart start=" part{" end=" part}" contained - -highlight link nmShowMessage Error -highlight link nmShowHeader Type -highlight link nmShowBody Statement -highlight link nmShowAttachment Statement -highlight link nmShowPart String +syntax cluster nmShowMsgDesc contains=nmShowMsgDescWho,nmShowMsgDescDate,nmShowMsgDescTags +syntax match nmShowMsgDescWho /[^)]\+)/ contained +syntax match nmShowMsgDescDate / ([^)]\+[0-9]) / contained +syntax match nmShowMsgDescTags /([^)]\+)$/ contained + +syntax cluster nmShowMsgHead contains=nmShowMsgHeadKey,nmShowMsgHeadVal +syntax match nmShowMsgHeadKey /^[^:]\+: / contained +syntax match nmShowMsgHeadVal /^\([^:]\+: \)\@<=.*/ contained + +syntax cluster nmShowMsgBody contains=@nmShowMsgBodyMail,@nmShowMsgBodyGit +syntax include @nmShowMsgBodyMail syntax/mail.vim +syntax include @nmShowMsgBodyGit syntax/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