* Caster ([EMAIL PROTECTED]) [13 Aug 2000 18:29]:
> On sob 12 sie 2000 16:05:27 GMT iain truskett wrote:
> > Clever, but only useful if your vi clone doesn't support something
> > like: set editor="vim +/^$/+1"

> Notice, that moving the cursor to the line that comes exactly after
> the first blank line is no what I want. I need vi to move the cursor
> to the second blank line and that's not the same.

Aah. I used a bad test case seeing what your code did.

> Maybe there is a way to pass [count] to to vim (
> /{pattern}[/]<CR>       Search forward for the [count]'th occurrence of
>                         {pattern} (exclusive).
> ) on the command line but I don't know how and that's offtopic.

   set editor="vim -c \":normal 2/^$/^M\" %s"

   and the ^M is obtained with Ctrl-V,Ctrl-M.

That's for vim. My brain hurts doing it for vi all in vi, so your awk
solution works there =)


cheers!
-- 
iain truskett, aka Koschei.                    <http://eh.org/~koschei/>
     Q: How do I block warnings?
     A: The simplest way is to do: close STDERR;             -- perliaq.

Reply via email to