aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/nm_vimpy-search.vim
blob: 4a19329e4f6780782b3acdbcf87464d6f9622ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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