On Thu, October 20, 2011 4:36 pm, Volker Bouffier wrote:
> I've inserted a small vim macro in my .vimrc, which does what I want:
>   " mutt: insert attachment
>   fun! RangerMuttAttach()
>       silent !ranger --choosefile=/tmp/chosenfile
>       if filereadable('/tmp/chosenfile')
>       exec 'read /tmp/chosenfile'
>           call system('rm /tmp/chosenfile')
>       endif
>       redraw!
>   endfun
>   map <C-a> magg/Reply-To<CR><ESC>:call RangerMuttAttach()<CR>IAttach:
> <ESC>`a

What exactly are you using ranger for? Is /tmp/chosenfile your mail
content?

There is also http://www.vim.org/scripts/script.php?script_id=2796
which defines an :AttachFile command and let's vim auto-complete
to the file.

regards,
Christian

Reply via email to