X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fsyntax%2Fnotmuch-search.vim;h=f458d778a2ccc464c8cb7f6e4814a5f20c55d865;hp=832b2b8466360518e3f1c69045d4b5277eeb583a;hb=dedd7918a33a002923954c1333bd6729cdc3d03f;hpb=acb696165c89fbc2f7030dcee5814f24a18628ce diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim index 832b2b84..f458d778 100644 --- a/vim/syntax/notmuch-search.vim +++ b/vim/syntax/notmuch-search.vim @@ -1,22 +1,12 @@ -" notmuch search mode syntax file - -" 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 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 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 nmSearchTags String - -highlight CursorLine term=reverse cterm=reverse gui=reverse +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