diff options
author | Bart Trojanowski <bart@jukie.net> | 2009-11-20 01:15:00 -0500 |
---|---|---|
committer | Bart Trojanowski <bart@jukie.net> | 2009-11-25 00:48:50 -0500 |
commit | 010eac8b434eee317b0d28eac9bcf544fc6994d1 (patch) | |
tree | 5e9ea2b9fab07e8650f3b0069319285d75c7e5d2 /vim/plugin | |
parent | 8a31802b94b935bcb5cb784e7dacead467972241 (diff) |
pretty colouring and folding for message show
Diffstat (limited to 'vim/plugin')
-rw-r--r-- | vim/plugin/notmuch.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index d772378..6e1f8b1 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -301,6 +301,21 @@ function! s:NM_cmd_show_mkfolds() endfor endfunction +function! s:NM_cmd_show_mksyntax() + let info = b:nm_raw_info + let cnt = 0 + for msg in info['msgs'] + let cnt = cnt + 1 + let start = msg['start'] + let hdr_start = msg['hdr_start'] + let body_start = msg['body_start'] + let end = msg['end'] + exec printf('syntax region nmShowMsg%dDesc start=''\%%%dl'' end=''\%%%dl'' contains=@nmShowMsgDesc', cnt, start, start+1) + exec printf('syntax region nmShowMsg%dHead start=''\%%%dl'' end=''\%%%dl'' contains=@nmShowMsgHead', cnt, hdr_start, body_start) + exec printf('syntax region nmShowMsg%dBody start=''\%%%dl'' end=''\%%%dl'' contains=@nmShowMsgBody', cnt, body_start, end) + endfor +endfunction + function! NM_cmd_show_foldtext() let foldtext = b:nm_raw_info['foldtext'] return foldtext[v:foldstart] |