aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim
diff options
context:
space:
mode:
authorGravatar Felipe Contreras <felipe.contreras@gmail.com>2011-02-06 14:10:53 +0200
committerGravatar Jameson Graef Rollins <jrollins@finestructure.net>2011-05-31 17:52:23 -0700
commite96741388a05fea1df68346770d161a52e93d520 (patch)
tree14518e8691391eee1695a507e8a100370ce5c3b3 /vim
parent8344c439bf84aa5ead9245108334a99713c384ab (diff)
vim: add delete commands
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'vim')
-rw-r--r--vim/plugin/notmuch.vim12
1 files changed, 12 insertions, 0 deletions
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 <SID>NM_show_mark_read_thread()<CR>',
\ 'a': ':call <SID>NM_show_archive_thread()<CR>',
\ 'A': ':call <SID>NM_show_mark_read_then_archive_thread()<CR>',
+ \ 'D': ':call <SID>NM_show_delete_thread()<CR>',
+ \ 'd': ':call <SID>NM_show_delete_message()<CR>',
\ 'N': ':call <SID>NM_show_mark_read_then_next_open_message()<CR>',
\ 'v': ':call <SID>NM_show_view_all_mime_parts()<CR>',
\ '+': ':call <SID>NM_show_add_tag()<CR>',
@@ -524,6 +526,16 @@ function! s:NM_show_mark_read_then_archive_thread()
call <SID>NM_show_next_thread()
endfunction
+function! s:NM_show_delete_thread()
+ call <SID>NM_tag(b:nm_search_words, ['+delete', '-inbox', '-unread'])
+ call <SID>NM_show_next_thread()
+endfunction
+
+function! s:NM_show_delete_message()
+ let msg = <SID>NM_show_get_message_for_line(line('.'))
+ call <SID>NM_tag([msg['id']], ['+delete', '-inbox', '-unread'])
+endfunction
+
function! s:NM_show_mark_read_then_next_open_message()
echo 'not implemented'
endfunction