On Sat, Jan 22, 2000 at 03:25:11AM -0500, David T-G wrote:
> Russell --
[SNIP]
> ...and then Russell Hoover said...
> % But I'm still not sure how to make a mutt macro to automatically put me
> % into vim in insert mode.  Right now I have this .muttrc macro:
> 
> Try an autocommand; for more info, go into vim and type 
> 
>   :help auto
> 
> and do some browsing.  You probably want something like
> 
>   :au BufRead mutt-* i
> 
> or close -- but I haven't tested that AT ALL :-)
[SNIP] 
> % 
> % # Start cursor at line 8 (with edit_headers set)
> % # in vim's insert mode when composing new mails ('m'):
> % 
> % macro index   m    ":set editor='vim +8'^M_A"  "compose a new mail message"
> % macro pager   m    ":set editor='vim +8'^M_A"  "compose a new mail message"
> % 
> % The problem is that almost anything I put after 'vim ...  is read as a
> % filename.  Not sure how to get around that, any tips appreciated.

Actually the way to be placed at the first line is also the auto commands in
vim.  I get a variable number of headers depending upon replies, hooks, etc.
So I use these commands snipped from Sven's .vimrc:

autocmd BufNewFile,BufRead mutt* :normal 1G}j

Which will move you to the beginning of the body.  Add i to the end and you
will be placed in insert mode (not tested)

HTH,
/Duncan
-- 
Duncan Watson          |||  Smith Rock Hit List - Homecoming Queen 5.7, The  
Unix Sysadmin at Large |||             Textbooks - Basalt Rimrock            
[EMAIL PROTECTED]          |||                                                   
Portland, OR           |||                                                   

PGP signature

Reply via email to