Placing vim cursor on *second* blank line on startup
- To: "Mutt users ml" <mutt-users@xxxxxxxx>
- Subject: Placing vim cursor on *second* blank line on startup
- From: "Andrew Haninger" <ahaning@xxxxxxxxx>
- Date: Wed, 14 Jun 2006 23:26:59 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=p8vaUy+jKauyqH/K9VhmfX2pnmdPZw0v9JCDPCLkEemh9XhM9utmqQ3E+gkgnEm0TG4z0VlGG49M4wdKwAmLIXiHO2aZIng2ijKmKGPvVdu5e0GKC1NI3HgO/c/fPs5PIWj5Sy2BqcJUz75N7tEh3atskIo8AAVcWfjBB4zkmoU=
- List-unsubscribe: <mailto:mutt-users-request@mutt.org?body=unsubscribe>
- Sender: owner-mutt-users@xxxxxxxx
Hello. If people think this question would be better suited to a vim
list, I'll take it there. It's something that some mutt user may have
stumbled upon earlier, though, and already devised a solution.
I'm using vim as my editor in mutt, as is the default. I also have a
couple options that modify what happens with my replies. Namely:
set edit_headers=yes
unset sig_dashes
So I get the To, From, Cc, Bcc, Date, and so on lines in my replies.
Also, my sig dashes are not automatically inserted (never fear,
there's a "-- \n" in my ~/.signature file).
My editor line in my muttrc looks like:
set editor="vim -c 'set filetype=mail' -c 'set textwidth=80' +/^$ +:startinsert"
the important part here being +/^$ which starts my cursor on the first
blank line. This was fine when I didn't have edit_headers set to yes.
However, now there's a blank line between the headers and my reply,
which is where vim puts the cursor. This is not the right place.
Is there a way to tell vim to start up and do something like the
command 2/^$ would do in vim? Place the cursor on the second instance
of a blank line?
Thanks!
-Andy