[PATCH] VIM: Add a 'tag all' folder option.
Ian Main
imain at stemwinder.org
Wed Oct 1 12:43:33 PDT 2014
This adds the ability to mark an entire folder as read (or any other
tags you like once you map it).
Ian
---
vim/notmuch.vim | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 331e930..3f2444b 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -11,6 +11,7 @@ let g:loaded_notmuch = "yep"
let g:notmuch_folders_maps = {
\ '<Enter>': 'folders_show_search()',
\ 's': 'folders_search_prompt()',
+ \ 'A': 'folders_tag_all("-inbox -unread")',
\ '=': 'folders_refresh()',
\ 'c': 'compose()',
\ }
@@ -378,6 +379,16 @@ ruby << EOF
EOF
endfunction
+function! s:folders_tag_all(tags)
+ruby << EOF
+ n = $curbuf.line_number
+ s = $searches[n - 1]
+ t = VIM::evaluate('a:tags')
+ do_tag(s, t)
+EOF
+ call s:folders_refresh()
+endfunction
+
function! s:folders()
call s:new_buffer('folders')
ruby folders_render()
--
1.9.3
More information about the notmuch
mailing list