aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/syntax/notmuch-search.vim
diff options
context:
space:
mode:
authorGravatar Felipe Contreras <felipe.contreras@gmail.com>2013-06-02 19:31:59 -0500
committerGravatar Felipe Contreras <felipe.contreras@gmail.com>2013-06-02 19:42:43 -0500
commit138c6aa098fe4236dc334cc55ac4fc414ddb298c (patch)
tree1521462482deec7317ed5234d5a87c1091261842 /vim/syntax/notmuch-search.vim
parentdbc3a247cac72e400efb45250e10eebe64722904 (diff)
Add new notmuch vim plugin
The old one was not properly maintained and is now deprecated. The new one has much better support. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'vim/syntax/notmuch-search.vim')
-rw-r--r--vim/syntax/notmuch-search.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim
new file mode 100644
index 00000000..f458d778
--- /dev/null
+++ b/vim/syntax/notmuch-search.vim
@@ -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