]> git.cworth.org Git - notmuch/commitdiff
vim: add option to mark as read + archive
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 5 Jun 2010 11:12:39 +0000 (14:12 +0300)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Nov 2010 18:00:18 +0000 (10:00 -0800)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
vim/plugin/notmuch.vim

index 01ee10f8a4b64ff0a1e105c94cb9087475f6bd9e..968c4c1652b5d3ebab46d3e1759fc4ef40aacf4c 100644 (file)
@@ -118,6 +118,7 @@ let g:notmuch_search_maps = {
         \ '<Enter>':    ':call <SID>NM_search_show_thread(1)<CR>',
         \ '<C-]>':      ':call <SID>NM_search_expand(''<cword>'')<CR>',
         \ 'a':          ':call <SID>NM_search_archive_thread()<CR>',
+        \ 'A':          ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',
         \ 'f':          ':call <SID>NM_search_filter()<CR>',
         \ 'm':          ':call <SID>NM_new_mail()<CR>',
         \ 'o':          ':call <SID>NM_search_toggle_order()<CR>',
@@ -310,6 +311,11 @@ function! s:NM_search_archive_thread()
         norm j
 endfunction
 
+function! s:NM_search_mark_read_then_archive_thread()
+        call <SID>NM_add_remove_tags([], '-', ['unread', 'inbox'])
+        norm j
+endfunction
+
 function! s:NM_search_filter()
         call <SID>NM_search_filter_helper('Filter: ', '', '')
 endfunction