----- Ursprüngliche Message -----
Von: du yang <duyang....@gmail.com>
An: mutt-users@mutt.org
Cc: 
Gesendet: 15:22 Donnerstag, 20.Oktober 2011 
Betreff: Re: external file manager

On Thursday 10/20/11 20:09:26 CST, Volker Bouffier wrote:
> There have had solutions for file attaching like so.
> For emacs, post-mode can do that.
> As I know, the solution is mainly for the problem poeple often forget 
> attaching
> files with mutt.;-)
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

Cheers
Volker

Reply via email to