X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=c731c4714da7db18a7d2727e8248b384af7349c6;hp=fee3ed57a5bd58035d783109f95256052e05c3dc;hb=e96741388a05fea1df68346770d161a52e93d520;hpb=8344c439bf84aa5ead9245108334a99713c384ab diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index fee3ed57..c731c471 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -154,6 +154,8 @@ let g:notmuch_show_maps = { \ 'I': ':call NM_show_mark_read_thread()', \ 'a': ':call NM_show_archive_thread()', \ 'A': ':call NM_show_mark_read_then_archive_thread()', + \ 'D': ':call NM_show_delete_thread()', + \ 'd': ':call NM_show_delete_message()', \ 'N': ':call NM_show_mark_read_then_next_open_message()', \ 'v': ':call NM_show_view_all_mime_parts()', \ '+': ':call NM_show_add_tag()', @@ -524,6 +526,16 @@ function! s:NM_show_mark_read_then_archive_thread() call NM_show_next_thread() endfunction +function! s:NM_show_delete_thread() + call NM_tag(b:nm_search_words, ['+delete', '-inbox', '-unread']) + call NM_show_next_thread() +endfunction + +function! s:NM_show_delete_message() + let msg = NM_show_get_message_for_line(line('.')) + call NM_tag([msg['id']], ['+delete', '-inbox', '-unread']) +endfunction + function! s:NM_show_mark_read_then_next_open_message() echo 'not implemented' endfunction