> -----Original Message-----
> From: Hari Krishna Dara [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 16, 2006 2:54 PM
> To: Jared Parsons
> Cc: vim@vim.org
> Subject: RE: Making Omni Complete suggest but not complete
> 
> 
> On Fri, 16 Jun 2006 at 2:23pm, Jared Parsons wrote:
> 
> > I'm both working on a new plugin (C#) and using a couple of existing
> ones.
> > I tried the hack of returning the original text as well.  It works if
> you
> > are using omni complete on demand.  However I would like to add
> automatic
> > omni complete after certain characters such as '.'.  In that case you
> can't
> > insert the existing text (there isn't any) and if you try and return ''
> as
> > one of the valid words omni complete will just ignore it.
> >
> > Jared
> 
> Yep, I saw that problem as well. As I mentioned in one of my other
> threads, I am trying to do automatic completion after every character
> using CursorMovedI event, and observe this issue sometimes, even when I
> always have some text to return.
> 
> If you are triggering completion on say '.', see if you can
> automatically rollback the completion by also doing a <C-P>. However you
> might not find a hook to invoke <C-P>
> 
> As a workaround, how about marking the start of completion as including
> the "." character, and include "." also as the first result? This will
> not work on the first column in the line, but I bet you will not face
> that problem.

That's a good solution.  The drop down will look a bit funny but it should
solve the immediate issue.  

Is there a fix planned for this in the future.  Some option I can specify to
prevent auto-insertion of a match?  

--
Jared


> 
> --
> HTH,
> Hari
> >
> > -----Original Message-----
> > From: Hari Krishna Dara [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 16, 2006 12:34 PM
> > To: Jared Parsons
> > Cc: vim@vim.org
> > Subject: Re: Making Omni Complete suggest but not complete
> >
> >
> > On Fri, 16 Jun 2006 at 11:46am, Jared Parsons wrote:
> >
> > > Is there any way to make omni complete popup a list of suggestions but
> not
> > > immediately add one of them to the buffer?  I find omni complete very
> > useful
> > > but it's incredibly annoying that it auto-chooses one of the entries.
> I'd
> > > prefer it popup the list of suggestions but not modify the buffer.
> > >
> >
> > You can workaround this by always returning the original text also as
> > the first match. If you are writing a plugin, then it is easy for you to
> > do this, but if you are using an existing plugin, you might have to wrap
> > the original function and add the original text before returning it. The
> > omni completion plugins should probably make this a standard setting.
> >
> >
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

Reply via email to