On Tue, 15 Aug 2006 at 4:43pm, Bill McCarthy wrote:

> On Tue 15-Aug-06 9:27am -0600, Benji Fisher wrote:
>
> Thanks for looking at this problem.  It looks like a Vim
> parsing error.
>
> > I remember something about not allowing :endwhile on the
> > same line as the :while , separated by | , but I cannot
> > find it in the docs today.
>
> I thought I had too but only could find:
>
>                         *:endf* *:endfunction* *E126* *E193*
> :endf[unction]  The end of a function definition. Must be on
>                 a line by its own, without other commands.
>
> I also looked for all references to while and endw within a
> text line of each other:
>
>     :helpg .*\n\=.*\<while\&.*\n\=.*\<endw
>
> One of the 10 hits implies single lines are ok:
>
>   It is allowed to have a "while" or "if" command
>   completely in the executed string:
>   :execute 'while i < 5 | echo i | let i = i + 1 | endwhile'
>
> Another gives a warning about commands I'm not using:
>
> NOTE: ":append" and ":insert" don't work properly in between
> ":if" and ":endif", ":for" and ":endfor", ":while" and
> ":endwhile".
>

I haven't been following the thread, but thought the below information
is relevant.

The commands that can't be followed by a '|' are listed under ":help
:bar". There are some tricks to workaround, such as using :exec and
<NL>, but they don't work for function. A combination of :exec and <NL>
can be used:

exec "function! T()\<NL>call input('T')\<NL>endfunction"

-- 
HTH,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to