From: Felipe Contreras Date: Sun, 6 Feb 2011 12:10:53 +0000 (+0200) Subject: vim: add delete commands X-Git-Tag: debian/0.6_254~76 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=e96741388a05fea1df68346770d161a52e93d520 vim: add delete commands Signed-off-by: Felipe Contreras --- 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