]> git.notmuchmail.org Git - notmuch/commitdiff
vim: add support to mark as read in search view
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 9 Dec 2010 19:15:43 +0000 (21:15 +0200)
committerJameson Graef Rollins <jrollins@finestructure.net>
Wed, 1 Jun 2011 00:52:23 +0000 (17:52 -0700)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
vim/plugin/notmuch.vim

index 05c21d3cead8af05305b4e01aed52f25ba13fcfe..fca48568921c6d8a1965593e22302d5de28db443 100644 (file)
@@ -120,6 +120,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>',
@@ -310,6 +311,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