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

Re: completeopt: menu|menuone + longest = bug?

Expand Messages
  • Eric Van Dewoestine
    ... I thought about this a bit more today, and I agree that adding a new option is not the proper solution. Not because it would confuse users, but because
    Message 1 of 7 , May 1, 2006
    • 0 Attachment
      > >
      > > It's too complicated already, adding another option will mainly cause
      > > more users to get confused. Also, I wouldn't know what to set it to for
      > > C.
      >
      > It's not that confusing. This is not a good reason for not implementing
      > something like 'completedelim'. A better reason would be that nobody
      > feels like implementing it and documenting it. So far there are three
      > options starting with "complete". This is complicated? I thought
      > Vim/Emacs are ultra configurable... and the menu/completion system is a
      > big feature.
      >
      > If it were up to me, I would have an option for what characters end the
      > completion, and also what characters select the current completion and
      > then end the completion... or something like that. Maybe not. At least
      > something like completedelim.

      I thought about this a bit more today, and I agree that adding a new
      option is
      not the proper solution. Not because it would confuse users, but because
      the set of characters that end a completion could depend on the completion
      method, so setting them at the filetype level wouldn't work.

      For example, the standard keyword completion (<c-n> and <c-p>) only spans word
      characters. Any non-word character should end the completion. Conversely, a
      user defined, or omni completion function may span back over non-word
      characters.

      Without knowing anything about how you've implemented the code completion
      internally, I'd guess that perhaps you could let the completion function
      decide when to start a new completion by invoking the completion function
      again and comparing the original starting column position with the new one.
      If they differ, then the function has deemed that it no longer considers the
      non-word character part of the original completion.

      You've mentioned a few times how the code completion logic is getting
      complicated, but is that a good reason for leaving in known issues? Perhaps
      after you have released vim70, vim71 should get a bit of an overhaul in this
      area now that you've encountered a broader range of use cases. While I find
      the current behavior I described in my original email very annoying, I still
      wouldn't consider it a show stopper for the final release of vim70. However,
      it would be a shame to never fix it just because it's "complicated".

      --
      eric
    • Bram Moolenaar
      ... It s not that it should not be fixed, it s that adding more options/features/commands/whatever is not a good fix. -- Eye have a spelling checker, it came
      Message 2 of 7 , May 2, 2006
      • 0 Attachment
        Eric Van Dewoestine wrote:

        > You've mentioned a few times how the code completion logic is getting
        > complicated, but is that a good reason for leaving in known issues?
        > Perhaps after you have released vim70, vim71 should get a bit of an
        > overhaul in this area now that you've encountered a broader range of
        > use cases. While I find the current behavior I described in my
        > original email very annoying, I still wouldn't consider it a show
        > stopper for the final release of vim70. However, it would be a shame
        > to never fix it just because it's "complicated".

        It's not that it should not be fixed, it's that adding more
        options/features/commands/whatever is not a good fix.

        --
        Eye have a spelling checker, it came with my PC;
        It plainly marks four my revue mistakes I cannot sea.
        I've run this poem threw it, I'm sure your please to no,
        It's letter perfect in it's weigh, my checker tolled me sew!

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      Your message has been successfully submitted and would be delivered to recipients shortly.