]> git.notmuchmail.org Git - notmuch/blobdiff - vim/syntax/notmuch-search.vim
vim: add git-diff.vim in README, make syntax work w/o the script
[notmuch] / vim / syntax / notmuch-search.vim
index 4b694722324f78eb9348b0f226c992a344b49290..3c2b2729b4023f1b580e3346812917a6d1bac1b4 100644 (file)
@@ -3,12 +3,13 @@
 " TODO: I cannot figure out why nmSearchTags is not matching anything :(
 
 syntax region nmSearchDate      start='^' end='\%13v'
-syntax region nmSearchCountAndFrom start='\%14v\[' end=';' oneline contains=nmSearchCount,nmSearchFrom
-syntax match  nmSearchFrom      ' .*;'                     contained
+syntax region nmSearchCountAndFrom start='\%14v\[' end='|' oneline contains=nmSearchCount,nmSearchFrom
 syntax region nmSearchCount     start='\%14v\[' end='\]'   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
@@ -17,6 +18,7 @@ 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