aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/syntax/notmuch-show.vim
diff options
context:
space:
mode:
authorGravatar Bart Trojanowski <bart@jukie.net>2009-11-19 16:20:16 -0500
committerGravatar Bart Trojanowski <bart@jukie.net>2009-11-25 00:48:50 -0500
commit89dc64726f9a396b0a0912788e1736141968c8b3 (patch)
tree4a2cfdd5091df1289f9a782fc9264197031e3bb5 /vim/syntax/notmuch-show.vim
parent71bdd859dc6f80a918412396cb66c219e0e60669 (diff)
first attempt to fold the message nicely
Diffstat (limited to 'vim/syntax/notmuch-show.vim')
-rw-r--r--vim/syntax/notmuch-show.vim17
1 files changed, 12 insertions, 5 deletions
diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim
index 06dd2ea2..02e12e99 100644
--- a/vim/syntax/notmuch-show.vim
+++ b/vim/syntax/notmuch-show.vim
@@ -1,13 +1,20 @@
" 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
+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 region nmBlockStart start='^ [a-z]\+{' end='$' oneline
+syntax region nmBlockEnd start='^ [a-z]\+}' end='$' oneline
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
+
+highlight Folded term=reverse ctermfg=LightGrey ctermbg=Black guifg=LightGray guibg=Black