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

Re: vim7: completeopt=menu sort order

Expand Messages
  • Mikolaj Machowski
    ... For me it is the first item... ... Wouldn t it still take whole cell? IMO color is enough to differentiate popup menu from background. m.
    Message 1 of 7 , Nov 11, 2005
    • 0 Attachment
      Dnia piątek, 11 listopada 2005 07:59, Johannes Zellner napisał:
      > Hello,
      >
      > 1. is it possible to change the sort order for the completeopt menu?
      > Currently the first (automatically selected) menu entry is placed
      > at the bottom of the menu, but I'd rather like it to be at the top.

      For me it is the first item...

      > 2. wouldn't a frame (e.g. by those thin ACS lines) nice?

      Wouldn't it still take whole cell? IMO color is enough to differentiate
      popup menu from background.

      m.
    • Johannes Zellner
      ... but it doesn t work when pressing ctrl-p! Suppose I ve complete=. (current buffer) and the buffer contains apple andy affiliation a
      Message 2 of 7 , Nov 11, 2005
      • 0 Attachment
        On Fri, Nov 11, 2005 at 07:38:36PM +0100, Martin Stubenschrott wrote:
        > On Friday 11 November 2005 07:59, Johannes Zellner wrote:
        > > Hello,
        > >
        > > 1. is it possible to change the sort order for the completeopt menu?
        > > Currently the first (automatically selected) menu entry is placed
        > > at the bottom of the menu, but I'd rather like it to be at the top.
        >
        > It works correctly here - but the sorting depends on the complete plugin, its
        > not necessarily alphabetical.
        > But I always have the top most entry selected after pressing ctrl-n or the
        > like.

        but it doesn't work when pressing ctrl-p! Suppose I've complete=.
        (current buffer) and the buffer contains

        apple
        andy
        affiliation

        a<--cursor is here

        Hitting ctrl-p, I get the menu excactly in the order as above

        apple
        andy
        affiliation <--this one is selected

        with the "affiliation selected" which is correct, but I'd rather like to
        have it sorted top-bottom like

        affiliation <--this one should be selected
        andy
        apple

        because "affiliation" is the first match, "andy" the second match and
        "apple" the third match. I just find it more intuitive to always have
        the first match on top. I find it quite irritating if the sort order
        depends on the search direction.

        I guess I'd love to have an option here ... ;-)

        --
        Johannes
      • Yegappan Lakshmanan
        ... As Bram is on vacation, we may not see the next Vim7 alpha snapshot for another two to three weeks. - Yegappan
        Message 3 of 7 , Nov 11, 2005
        • 0 Attachment
          On 11/11/05, Martin Stubenschrott <stubenschrott@...> wrote:
          >
          >
          > As a sidenote: does anybody know, when there will be a new vim alpha snapshot
          > (7.00.157 is quite old now - 1 month withouth any checkins)?
          >

          As Bram is on vacation, we may not see the next Vim7 alpha snapshot
          for another two to three weeks.

          - Yegappan
        • Bram Moolenaar
          ... The order is what the completion function returns. When using CTRL-P (previous) the last match is selected, with CTRL-N the first match is selected.
          Message 4 of 7 , Nov 19, 2005
          • 0 Attachment
            Johannes Zellner wrote:

            > 1. is it possible to change the sort order for the completeopt menu?
            > Currently the first (automatically selected) menu entry is placed
            > at the bottom of the menu, but I'd rather like it to be at the top.

            The order is what the completion function returns. When using CTRL-P
            (previous) the last match is selected, with CTRL-N the first match is
            selected. Otherwise the ordering of matches would depend on whether you
            use CTRL-N or CTRL-P

            > 2. wouldn't a frame (e.g. by those thin ACS lines) nice?

            On what terminals would that work?

            --
            hundred-and-one symptoms of being an internet addict:
            99. The hum of a cooling fan and the click of keys is comforting to you.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
          • Dr. Johannes Zellner
            ... I d really like to have an option here! When using CTRL-P (which I usually do, as it takes what I typed most recently) the completion menu appears below
            Message 5 of 7 , Apr 4 10:42 PM
            • 0 Attachment
              On Sat, Nov 19, 2005 at 05:39:23PM +0100, Bram Moolenaar wrote:
              >
              > Johannes Zellner wrote:
              >
              > > 1. is it possible to change the sort order for the completeopt menu?
              > > Currently the first (automatically selected) menu entry is placed
              > > at the bottom of the menu, but I'd rather like it to be at the top.
              >
              > The order is what the completion function returns. When using CTRL-P
              > (previous) the last match is selected, with CTRL-N the first match is
              > selected. Otherwise the ordering of matches would depend on whether you
              > use CTRL-N or CTRL-P

              I'd really like to have an option here! When using CTRL-P (which I
              usually do, as it takes what I typed most recently) the completion menu
              appears below the cursor but the first selected item of the completion
              menu is at the bottom of the menu -- so it's far away from the current
              line, which I find quite annoying. If you insist on this ordering, I'd
              propose at least that in the case of typing CTRL-P, the menu should then
              preferable (if there's enough space) appear ABOVE the current line, so
              the closest match (for backward searching CTRL-P) which is displayed at
              the bottom of the menu is again closest to the cursor.

              What about stuff like

              " place menu above current line if enough space
              completeopt=menu-above

              and

              " always order the completion matches so that the first match is at
              " the top, no matter if CTRL-P or CTRL-N was typed.
              completeopt=menu-first-match-at-top

              Well, the option names are a bit lengthy, but you get the point.

              --
              Johannes
            Your message has been successfully submitted and would be delivered to recipients shortly.