]> git.cworth.org Git - obsolete/notmuch-old/blobdiff - vim/syntax/notmuch-search.vim
Add new notmuch vim plugin
[obsolete/notmuch-old] / vim / syntax / notmuch-search.vim
diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim
new file mode 100644 (file)
index 0000000..f458d77
--- /dev/null
@@ -0,0 +1,12 @@
+syntax region nmSearch         start=/^/ end=/$/               oneline contains=nmSearchDate
+syntax match nmSearchDate      /^.\{-13}/                      contained nextgroup=nmSearchNum
+syntax match nmSearchNum       /.\{-4}/                        contained nextgroup=nmSearchFrom
+syntax match nmSearchFrom      /.\{-21}/                       contained nextgroup=nmSearchSubject
+syntax match nmSearchSubject   /.\{0,}\(([^()]\+)$\)\@=/       contained nextgroup=nmSearchTags
+syntax match nmSearchTags      /.\+$/                          contained
+
+highlight link nmSearchDate    Statement
+highlight link nmSearchNum     Type
+highlight link nmSearchFrom    Include
+highlight link nmSearchSubject Normal
+highlight link nmSearchTags    String