X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=6e1f8b14a8ed7a8f1b25df1c5d52db3aef7810a7;hb=010eac8b434eee317b0d28eac9bcf544fc6994d1;hp=d77237811667e618172b1d1272b1403eb378e392;hpb=8a31802b94b935bcb5cb784e7dacead467972241;p=notmuch diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index d7723781..6e1f8b14 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]