aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/nm_vimpy-search.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/syntax/nm_vimpy-search.vim')
-rw-r--r--vim/syntax/nm_vimpy-search.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/vim/syntax/nm_vimpy-search.vim b/vim/syntax/nm_vimpy-search.vim
new file mode 100644
index 0000000..4a19329
--- /dev/null
+++ b/vim/syntax/nm_vimpy-search.vim
@@ -0,0 +1,18 @@
+syntax region nmSearch start=/^/ end=/$/ oneline contains=nmSearchDate keepend
+syntax match nmSearchDate /^.\{-13}/ contained nextgroup=nmSearchNum skipwhite
+syntax match nmSearchNum "[0-9]\+\/" contained nextgroup=nmSearchTotal skipwhite
+syntax match nmSearchTotal /[0-9]\+/ contained nextgroup=nmSearchFrom skipwhite
+syntax match nmSearchFrom /.\{-}\ze|/ contained nextgroup=nmSearchSubject skipwhite
+"XXX this fails on some messages with multiple authors
+syntax match nmSearchSubject /.*\ze(/ contained nextgroup=nmSearchTags,nmUnread
+syntax match nmSearchTags /.\+$/ contained
+syntax match nmUnread /.*\<unread\>.*)$/ contained
+
+highlight link nmSearchDate Statement
+highlight link nmSearchNum Number
+highlight link nmSearchTotal Type
+highlight link nmSearchFrom Include
+highlight link nmSearchSubject Normal
+highlight link nmSearchTags String
+
+highlight link nmUnread Underlined