* [PATCH 1/4] vim: add support to mark as read in show view
2011-05-04 20:13 [PATCH 0/4] vim: more keyboard maps Felipe Contreras
@ 2011-05-04 20:13 ` Felipe Contreras
2011-05-04 20:13 ` [PATCH 2/4] vim: add support to mark as read in search view Felipe Contreras
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2011-05-04 20:13 UTC (permalink / raw)
To: notmuch
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
vim/plugin/notmuch.vim | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 3375a96..05e4552 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -147,6 +147,7 @@ let g:notmuch_show_maps = {
\ 'h': ':call <SID>NM_show_fold_toggle(''h'', ''hdr'', !g:notmuch_show_fold_headers)<CR>',
\ 'i': ':call <SID>NM_show_fold_toggle(''s'', ''sig'', !g:notmuch_show_fold_signatures)<CR>',
\
+ \ '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>',
\ 'N': ':call <SID>NM_show_mark_read_then_next_open_message()<CR>',
@@ -494,6 +495,11 @@ function! s:NM_show_next_thread()
endif
endfunction
+function! s:NM_show_mark_read_thread()
+ call <SID>NM_tag(b:nm_search_words, ['-unread'])
+ call <SID>NM_show_next_thread()
+endfunction
+
function! s:NM_show_archive_thread()
call <SID>NM_tag(b:nm_search_words, ['-inbox'])
call <SID>NM_show_next_thread()
--
1.7.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] vim: add support to mark as read in search view
2011-05-04 20:13 [PATCH 0/4] vim: more keyboard maps Felipe Contreras
2011-05-04 20:13 ` [PATCH 1/4] vim: add support to mark as read in show view Felipe Contreras
@ 2011-05-04 20:13 ` Felipe Contreras
2011-05-04 20:13 ` [PATCH 3/4] vim: add support for delete " Felipe Contreras
2011-05-04 20:13 ` [PATCH 4/4] vim: add delete commands Felipe Contreras
3 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2011-05-04 20:13 UTC (permalink / raw)
To: notmuch
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
vim/plugin/notmuch.vim | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 05e4552..6f9ff18 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -118,6 +118,7 @@ let g:notmuch_search_maps = {
\ '<Space>': ':call <SID>NM_search_show_thread(0)<CR>',
\ '<Enter>': ':call <SID>NM_search_show_thread(1)<CR>',
\ '<C-]>': ':call <SID>NM_search_expand(''<cword>'')<CR>',
+ \ 'I': ':call <SID>NM_search_mark_read_thread()<CR>',
\ 'a': ':call <SID>NM_search_archive_thread()<CR>',
\ 'A': ':call <SID>NM_search_mark_read_then_archive_thread()<CR>',
\ 'f': ':call <SID>NM_search_filter()<CR>',
@@ -308,6 +309,11 @@ function! s:NM_search_edit()
endif
endfunction
+function! s:NM_search_mark_read_thread()
+ call <SID>NM_tag([], ['-unread'])
+ norm j
+endfunction
+
function! s:NM_search_archive_thread()
call <SID>NM_tag([], ['-inbox'])
norm j
--
1.7.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] vim: add support for delete in search view
2011-05-04 20:13 [PATCH 0/4] vim: more keyboard maps Felipe Contreras
2011-05-04 20:13 ` [PATCH 1/4] vim: add support to mark as read in show view Felipe Contreras
2011-05-04 20:13 ` [PATCH 2/4] vim: add support to mark as read in search view Felipe Contreras
@ 2011-05-04 20:13 ` Felipe Contreras
2011-05-04 20:13 ` [PATCH 4/4] vim: add delete commands Felipe Contreras
3 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2011-05-04 20:13 UTC (permalink / raw)
To: notmuch
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
vim/plugin/notmuch.vim | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 6f9ff18..c49ada5 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -121,6 +121,7 @@ let g:notmuch_search_maps = {
\ 'I': ':call <SID>NM_search_mark_read_thread()<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>',
@@ -324,6 +325,11 @@ function! s:NM_search_mark_read_then_archive_thread()
norm j
endfunction
+function! s:NM_search_delete_thread()
+ call <SID>NM_tag([], ['+delete','-inbox','-unread'])
+ norm j
+endfunction
+
function! s:NM_search_filter()
call <SID>NM_search_filter_helper('Filter: ', '', '')
endfunction
--
1.7.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] vim: add delete commands
2011-05-04 20:13 [PATCH 0/4] vim: more keyboard maps Felipe Contreras
` (2 preceding siblings ...)
2011-05-04 20:13 ` [PATCH 3/4] vim: add support for delete " Felipe Contreras
@ 2011-05-04 20:13 ` Felipe Contreras
3 siblings, 0 replies; 5+ messages in thread
From: Felipe Contreras @ 2011-05-04 20:13 UTC (permalink / raw)
To: notmuch
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
vim/plugin/notmuch.vim | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index c49ada5..0b1e0a3 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -152,6 +152,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>',
@@ -522,6 +524,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
--
1.7.5
^ permalink raw reply related [flat|nested] 5+ messages in thread