diff options
Diffstat (limited to 'vim/syntax')
-rw-r--r-- | vim/syntax/nm_vimpy-compose.vim | 7 | ||||
-rw-r--r-- | vim/syntax/nm_vimpy-folders.vim | 15 | ||||
-rw-r--r-- | vim/syntax/nm_vimpy-search.vim | 18 | ||||
-rw-r--r-- | vim/syntax/nm_vimpy-show.vim | 23 |
4 files changed, 63 insertions, 0 deletions
diff --git a/vim/syntax/nm_vimpy-compose.vim b/vim/syntax/nm_vimpy-compose.vim new file mode 100644 index 0000000..19adb75 --- /dev/null +++ b/vim/syntax/nm_vimpy-compose.vim @@ -0,0 +1,7 @@ +runtime! syntax/mail.vim + +syntax region nmComposeHelp contains=nmComposeHelpLine start='^Notmuch-Help:\%1l' end='^\(Notmuch-Help:\)\@!' +syntax match nmComposeHelpLine /Notmuch-Help:/ contained + +highlight link nmComposeHelp Include +highlight link nmComposeHelpLine Error diff --git a/vim/syntax/nm_vimpy-folders.vim b/vim/syntax/nm_vimpy-folders.vim new file mode 100644 index 0000000..fab6956 --- /dev/null +++ b/vim/syntax/nm_vimpy-folders.vim @@ -0,0 +1,15 @@ +" notmuch folders mode syntax file + +syntax region nmFolfers start=/^/ end=/$/ oneline contains=nmFoldersMessageCount +syntax match nmFoldersMessageCount /^ *[0-9]\+ */ contained nextgroup=nmFoldersUnreadCount +syntax match nmFoldersUnreadCount /(.\{-}) */ contained nextgroup=nmFoldersName +syntax match nmFoldersName /.*\ze(/ contained nextgroup=nmFoldersSearch +syntax match nmFoldersSearch /([^()]\+)$/ + +highlight link nmFoldersMessageCount Statement +highlight link nmFoldersUnreadCount Underlined +highlight link nmFoldersName Type +highlight link nmFoldersSearch String + +highlight CursorLine term=reverse cterm=reverse gui=reverse + 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 diff --git a/vim/syntax/nm_vimpy-show.vim b/vim/syntax/nm_vimpy-show.vim new file mode 100644 index 0000000..d21eb45 --- /dev/null +++ b/vim/syntax/nm_vimpy-show.vim @@ -0,0 +1,23 @@ +" notmuch show mode syntax file + +setlocal conceallevel=2 +setlocal concealcursor=vinc + +syntax region nmMessage matchgroup=Ignore concealends start='[0-9]\+\/-*message start-*\\' end='\\-*message end-*\/' fold contains=@nmShowMsgBody keepend + +"TODO what about those +syntax cluster nmShowMsgDesc contains=nmShowMsgDescWho,nmShowMsgDescDate,nmShowMsgDescTags +syntax match nmShowMsgDescWho /[^)]\+)/ contained +syntax match nmShowMsgDescDate / ([^)]\+[0-9]) / contained +syntax match nmShowMsgDescTags /([^)]\+)$/ contained + +syntax cluster nmShowMsgBody contains=@nmShowMsgBodyMail,@nmShowMsgBodyGit +syntax include @nmShowMsgBodyMail syntax/mail.vim +silent! syntax include @nmShowMsgBodyGit syntax/notmuch-git-diff.vim + +highlight nmShowMsgDescWho term=reverse cterm=reverse gui=reverse +highlight link nmShowMsgDescDate Type +highlight link nmShowMsgDescTags String + +"TODO what about this? +highlight Folded term=reverse ctermfg=LightGrey ctermbg=Black guifg=LightGray guibg=Black |