]> git.cworth.org Git - notmuch/commitdiff
vim: primitive reply to message
authorBart Trojanowski <bart@jukie.net>
Fri, 27 Nov 2009 21:52:00 +0000 (16:52 -0500)
committerBart Trojanowski <bart@jukie.net>
Fri, 27 Nov 2009 21:52:00 +0000 (16:52 -0500)
vim/README
vim/plugin/notmuch.vim

index 3965eeb4175dc7fa10c66020016555e43e0e1b23..a139dfce1eedbe206252ddffb8fd0fc043fc5ef0 100644 (file)
@@ -69,6 +69,7 @@ Buffer types:
             c       - toggle folding of citations
             h       - toggle folding of extra header lines
             m       - compose a new message
+            r       - reply to the message
             s       - toggle folding of signatures
             q       - return to search display
             ?       - reveal the message and thread IDs of what's under cursor
index 23feb7de3a5c0603d092bfdd2c3c5f9ce4c8b715..9932e3f16095e65931280701cda284b7b21ea233 100644 (file)
@@ -506,7 +506,14 @@ function! s:NM_show_previous_message()
 endfunction
 
 function! s:NM_show_reply()
-        echo 'not implemented'
+        let cmd = ['reply']
+        call add(cmd, <SID>NM_show_message_id())
+        call add(cmd, 'AND')
+        call extend(cmd, <SID>NM_get_search_words())
+
+        let data = <SID>NM_run(cmd)
+        let lines = split(data, "\n")
+        call <SID>NM_newComposeBuffer(lines, 0)
 endfunction
 
 function! s:NM_show_view_all_mime_parts()