From 30e14ab95bdf039ac4abac20abd881d9909b1d5b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 Nov 2017 14:40:38 +1300 Subject: Beginnings of a buffer-to-Mutt mailer plugin --- vim/config/command.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 nnoremap \ D \ :read !date -u + +" \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 + \ m + \ :call Mutt() -- cgit v1.2.3