Also map space to mark a message as read and archived.

Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---

I forced myself to use the version of notmuch-vim in notmuch and while
it works, this is the single most important feature I missed the most.

 vim/notmuch.vim | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index c1c2f63d..dc4f6242 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -40,6 +40,7 @@ let g:notmuch_show_maps = {
        \ 'r':          'show_reply()',
        \ '?':          'show_info()',
        \ '<Tab>':      'show_next_msg()',
+       \ '<Space>':    'show_message_tag("-inbox -unread")',
        \ 'c':          'compose()',
        \ }
 
@@ -206,6 +207,16 @@ function! s:show_tag(intags)
        call s:show_next_thread()
 endfunction
 
+function! s:show_message_tag(intags)
+       if empty(a:intags)
+               let tags = input('tags: ')
+       else
+               let tags = a:intags
+       endif
+       ruby do_tag('id:' + get_message.message_id, VIM::evaluate('l:tags'))
+  call s:show_next_msg()
+endfunction
+
 function! s:search_search_prompt()
        let text = input('Search: ')
        if text == ""
-- 
2.40.0+fc1

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to