]> git.cworth.org Git - notmuch/commitdiff
vim: add support for delete in search view
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 9 Dec 2010 19:19:44 +0000 (21:19 +0200)
committerJameson Graef Rollins <jrollins@finestructure.net>
Wed, 1 Jun 2011 00:52:23 +0000 (17:52 -0700)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
vim/plugin/notmuch.vim

index fca48568921c6d8a1965593e22302d5de28db443..fee3ed57a5bd58035d783109f95256052e05c3dc 100644 (file)
@@ -123,6 +123,7 @@ let g:notmuch_search_maps = {
         \ 'I':          ':call <SID>NM_search_mark_read_thread()<CR>',
         \ 'a':          ':call <SID>NM_search_archive_thread()<CR>',
         \ 'A':          ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',
+        \ 'D':          ':call <SID>NM_search_delete_thread()<CR>',
         \ 'f':          ':call <SID>NM_search_filter()<CR>',
         \ 'm':          ':call <SID>NM_new_mail()<CR>',
         \ 'o':          ':call <SID>NM_search_toggle_order()<CR>',
@@ -326,6 +327,11 @@ function! s:NM_search_mark_read_then_archive_thread()
         norm j
 endfunction
 
+function! s:NM_search_delete_thread()
+        call <SID>NM_tag([], ['+delete','-inbox','-unread'])
+        norm j
+endfunction
+
 function! s:NM_search_filter()
         call <SID>NM_search_filter_helper('Filter: ', '', '')
 endfunction