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

Placing vim cursor on *second* blank line on startup



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