On Fri, 6 Oct 2006 at 8:19am, Jürgen Krämer wrote:

>
> Hi,
>
> Hari Krishna Dara wrote:
> > The help on complete() gives an example as a usage pattern which seems
> > to be very useful, but it doesn't work. Here is a slightly modified
> > example to avoid breaking the lines in email transmission:
> >
> > inoremap <expr> <F5> ListWeeks()
> > func! ListWeeks()
> >   call complete(col('.'), ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri',
'Sat'])
> >   return ''
> > endfunc
> >
> > If you hit <F5>, Vim complains about the complete() as not allowed.
> >
> > Error detected while processing function ListWeeks:
> > line    1:
> > E523: Not allowed here
>
> I don't know the reason for this restriction, but it is documented under
> ":help complete()":

I am sorry, what exactly are you referring to as documented? The help on
complete() talks nothing about E523 or why it can't be used in <expr>
maps. In fact the above example is directly based on the example given
in that help.

-- 
Thanks,
Hari

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

Reply via email to