X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fsyntax%2Fnotmuch-search.vim;fp=vim%2Fsyntax%2Fnotmuch-search.vim;h=eb7d88fa30d45b1cb6b6a2bc2ae28945abfdd4cf;hp=0000000000000000000000000000000000000000;hb=3493ea0ed5bd20b961aafa01eeddaf8cbc49b52f;hpb=5e7df3c17e0d07d5252820beb5ef1e0bfea86498 diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim new file mode 100644 index 00000000..eb7d88fa --- /dev/null +++ b/vim/syntax/notmuch-search.vim @@ -0,0 +1,22 @@ +" 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 match nmSearchFrom ' .*;' contained +syntax region nmSearchCount start="\%14v\[" end="\]" contained contains=nmSearchCountZero,nmSearchCountSome,nmSearchCountAll +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