aboutsummaryrefslogtreecommitdiff
path: root/vim/config/command.vim
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 /vim/config/command.vim
parentMerge branch 'hotfix/v0.12.1' into develop (diff)
downloaddotfiles-30e14ab95bdf039ac4abac20abd881d9909b1d5b.tar.gz
dotfiles-30e14ab95bdf039ac4abac20abd881d9909b1d5b.zip
Beginnings of a buffer-to-Mutt mailer plugin
Diffstat (limited to 'vim/config/command.vim')
-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>