Loading ...
Sorry, an error occurred while loading the content.

108159Re: Is this ccomplete's bug?

Expand Messages
  • jason
    Oct 1, 2009
    • 0 Attachment
      Hi Brett
      I tried omnicppcomplete-0.41 as Dominique's setting,
      but it didn't work for me.
      Error message is "Omni Completion (^O^N^P) pattern not found"
      I tested it in the same file.
      I saw omnifunc=omni#cpp#complete#Main,
      which is from omnicppcomplet-0.4.1.
      I have no idea to get it solved.

      2009/10/2 Brett Stahlman <brettstahlman@...>

      On Oct 1, 6:30 am, jason <beyond...@...> wrote:
      > Hi Dominique
      > I don't use omnicppcomplete-0.41, I use vim's default omnicomplete function.
      > These is my .vimrc setting about omnicomplete function:
      > set completeopt=menu,longest
      > set omnifunc=ccomplete#Complete
      > My vim version is 7.2.0 in Windows and 7.2.245 in Slackware 13.0.
      > Ctags is 5.7. I just run "ctags -R ." in working dir.
      > In your screenshot, you inserted a space before "sA.", which changed to
      > "pb-> sA.", not "pb->sA.".
      > My problem is that if I don't insert space before "sA.", just "pb->sA.",
      > then put cursor behind "sA.", press C-X C-O,
      > omnicomplete's completion information is members of struct tagBBB,
      > but not members of struct tagAAA.
      > Thanks!
      > B.R.

      I see the same behavior as you. In fact, you will see the same list of
      members even if you use aa or bb instead of sA. I haven't looked at it
      in detail, but a quick glance at the ccomplete.vim file leads me to
      suspect that it doesn't contain the recursive logic to traverse a
      sequence of nested structures. I believe that for a . or ->
      completion, it looks all the way back to the beginning of the WORD
      (unbroken sequence of non-whitespace, including . and ->) to determine
      the type whose members will be displayed in the popup. If you type...
      ...you will still see the members of BB in the popup; i.e., only the
      type of pb matters.

      As Dominique pointed out, omnicppcomplete doesn't suffer from this
      limitation, and it works for C and C++. Incidentally, does anyone know
      whether Vissale Neang still maintains the omnicppcomplete plugin? I
      haven't gotten responses to a post and a private email on several
      omnicppcomplete issues...

      Brett Stahlman

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php

    • Show all 10 messages in this topic