Re: Placing vim cursor on *second* blank line on startup
On Wed, Jun 14, 2006 at 11:26:59PM -0400, Andrew Haninger wrote:
> 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 can't find anything from a quick search, but I know for a fact this
has been asked before.
> 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.
That's a matter of opinion. Not to be snarky and unhelpful, but you
*are* planning on trimming the quoted message, right? I think it makes
more sense to start at the top of the message, but that's just my
opinion.
But if you really want to do it that way,
set editor="vim -c '+/^$/ +/^$/'
(or something) seems to work, even if it's not the most elegant
solution.
I also have a macro in my .vimrc which deletes everything from the current
position to the sig....
map S d/^--<CR>ko<CR>
w