From e96741388a05fea1df68346770d161a52e93d520 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 6 Feb 2011 14:10:53 +0200 Subject: [PATCH] vim: add delete commands Signed-off-by: Felipe Contreras --- vim/plugin/notmuch.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.26.2