notmuch.vim plugin can use the d keybinding to remove 'inbox' and 'unread' tags
and add 'deleted' from the search and show screens, the deleted tag can then be
used to remove items from the maildir that are well and truly worth of deleting
---
vim/plugin/notmuch.vim | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index bdf03ba..5bd5e1f 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -120,6 +120,7 @@ let g:notmuch_search_maps = {
\ '<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>',
+ \ '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>',
@@ -150,6 +151,7 @@ let g:notmuch_show_maps = {
\ 'a': ':call <SID>NM_show_archive_thread()<CR>',
\ 'A': ':call
<SID>NM_show_mark_read_then_archive_thread()<CR>',
\ 'N': ':call
<SID>NM_show_mark_read_then_next_open_message()<CR>',
+ \ 'd': ':call <SID>NM_show_delete_thread()<CR>',
\ 'v': ':call <SID>NM_show_view_all_mime_parts()<CR>',
\ '+': ':call <SID>NM_show_add_tag()<CR>',
\ '-': ':call <SID>NM_show_remove_tag()<CR>',
@@ -317,6 +319,12 @@ function! s:NM_search_mark_read_then_archive_thread()
norm j
endfunction
+function! s:NM_search_delete_thread()
+ call <SID>NM_add_remove_tags([], '-', ['inbox', 'unread'])
+ call <SID>NM_add_remove_tags([], '+', ['deleted'])
+ norm j
+endfunction
+
function! s:NM_search_filter()
call <SID>NM_search_filter_helper('Filter: ', '', '')
endfunction
@@ -506,6 +514,12 @@ function! s:NM_show_mark_read_then_next_open_message()
echo 'not implemented'
endfunction
+
+function! s:NM_show_delete_thread()
+ call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['unread',
'inbox'])
+ call <SID>NM_add_remove_tags(b:nm_search_words, '+', ['deleted'])
+endfunction
+
function! s:NM_show_previous_message()
echo 'not implemented'
endfunction
--
1.7.2.3
--
email sent from notmuch.vim plugin