aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-11-27 17:32:50 -0800
committerCarl Worth <cworth@cworth.org>2009-11-27 17:32:50 -0800
commitc835e2a5059ebc10580f8ae2a79c4f0f81374798 (patch)
tree936b9414363129c63b42bf7f16048623b693f7a9 /vim/syntax
parent5c7c6c0baefaf63d2b79c014b85c391a66261feb (diff)
parente6628e78d9ce3f9383a4699df9063a648617b428 (diff)
Merge remote branch 'jukie/vim'
Diffstat (limited to 'vim/syntax')
-rw-r--r--vim/syntax/notmuch-compose.vim7
-rw-r--r--vim/syntax/notmuch-folders.vim12
-rw-r--r--vim/syntax/notmuch-search.vim24
-rw-r--r--vim/syntax/notmuch-show.vim25
4 files changed, 68 insertions, 0 deletions
diff --git a/vim/syntax/notmuch-compose.vim b/vim/syntax/notmuch-compose.vim
new file mode 100644
index 00000000..19adb756
--- /dev/null
+++ b/vim/syntax/notmuch-compose.vim
@@ -0,0 +1,7 @@
+runtime! syntax/mail.vim
+
+syntax region nmComposeHelp contains=nmComposeHelpLine start='^Notmuch-Help:\%1l' end='^\(Notmuch-Help:\)\@!'
+syntax match nmComposeHelpLine /Notmuch-Help:/ contained
+
+highlight link nmComposeHelp Include
+highlight link nmComposeHelpLine Error
diff --git a/vim/syntax/notmuch-folders.vim b/vim/syntax/notmuch-folders.vim
new file mode 100644
index 00000000..9477f86f
--- /dev/null
+++ b/vim/syntax/notmuch-folders.vim
@@ -0,0 +1,12 @@
+" notmuch folders mode syntax file
+
+syntax region nmFoldersCount start='^' end='\%10v'
+syntax region nmFoldersName start='\%11v' end='\%31v'
+syntax match nmFoldersSearch /([^()]\+)$/
+
+highlight link nmFoldersCount Statement
+highlight link nmFoldersName Type
+highlight link nmFoldersSearch String
+
+highlight CursorLine term=reverse cterm=reverse gui=reverse
+
diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim
new file mode 100644
index 00000000..71839fd9
--- /dev/null
+++ b/vim/syntax/notmuch-search.vim
@@ -0,0 +1,24 @@
+" notmuch search mode syntax file
+
+" TODO: I cannot figure out why nmSearchTags is not matching anything :(
+
+syntax region nmSearchDate start='^' end='\%13v' oneline
+syntax region nmSearchCountAndFrom start='\%14v\[' end='|' oneline contains=nmSearchCount,nmSearchFrom
+syntax region nmSearchCount start='\[' end='\]' oneline contained contains=nmSearchCountZero,nmSearchCountSome,nmSearchCountAll
+syntax region nmSearchFrom start='\]\@<=' end='|' oneline contained
+syntax match nmSearchCountZero '0/\(\d\+\)' contained
+syntax match nmSearchCountSome '\([1-9]\d*\)/\(\d\+\)' contained
+syntax match nmSearchCountAll '\(\d\+\)/\1' contained
+syntax match nmSearchSquareBracketText '\(\[\w\+\]\)'
+syntax match nmSearchTags /([^)]\+)$/
+
+highlight link nmSearchDate Statement
+"highlight link nmSearchCount Comment
+highlight link nmSearchCountZero Function
+highlight link nmSearchCountSome Special
+highlight link nmSearchCountAll Type
+highlight link nmSearchFrom Include
+highlight link nmSearchSquareBracketText Special
+highlight link nmSearchTags String
+
+highlight CursorLine term=reverse cterm=reverse gui=reverse
diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim
new file mode 100644
index 00000000..20bcc399
--- /dev/null
+++ b/vim/syntax/notmuch-show.vim
@@ -0,0 +1,25 @@
+" notmuch show mode syntax file
+
+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
+
+" git-diff.vim marks up diffs in emails, see README for details
+silent! 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