aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-08 14:40:38 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-08 14:40:38 +1300
commit30e14ab95bdf039ac4abac20abd881d9909b1d5b (patch)
tree6b1fd6007eb652e8f5254c95896b6f41063e8f44
parent79f3e151582f7d2683b4752ee1cb12df81471cf2 (diff)
downloaddotfiles-30e14ab95bdf039ac4abac20abd881d9909b1d5b.tar.gz
dotfiles-30e14ab95bdf039ac4abac20abd881d9909b1d5b.zip
Beginnings of a buffer-to-Mutt mailer plugin
-rw-r--r--vim/config/command.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/vim/config/command.vim b/vim/config/command.vim
index 09ee0f40..a8861583 100644
--- a/vim/config/command.vim
+++ b/vim/config/command.vim
@@ -34,3 +34,13 @@ nnoremap <silent>
nnoremap <silent>
\ <Leader>D
\ :<C-U>read !date -u<CR>
+
+" \m fires up mutt with either the whole buffer or the text
+function s:Mutt()
+ let l:tf = tempname()
+ execute 'write '.fnameescape(l:tf)
+ execute '!mutt -i '.shellescape(l:tf)
+endfunction
+nnoremap <silent>
+ \ <Leader>m
+ \ :<C-U>call <SID>Mutt()<CR>