<<< Date Index >>>     <<< Thread Index >>>

Re: Changing the default cursor position in vim



Hi Greg.

Greg Tees:
> Hey, I use vim as my editor, and I was wondering if anyone could tell me
> how, when composing a new message, you could have the cursor start below
> the headers rather then at the top of the document.

I do this by having

  set editor="~/bin/compose.sh"

in my .muttrc, where ~/bin/compose.sh contains:

  #!/bin/sh
  /usr/bin/vim -s ~/bin/compose.vim $1

and ~/bin/compose.vim contains:

  :se tw=72
  1G
  /^$
  :nohlsearch
  O

This positions the cursor at the first line of the body and opens a new
line for insertion.

-- 
Cameron McCormack, http://mcc.id.au/
        xmpp:heycam@xxxxxxxxxx  ▪  ICQ 26955922  ▪  MSN cam@xxxxxxxxx