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

some problem with vim7f Beta

Expand Messages
  • Linsong
    Hi, I just try the fresh vim7f Beta on my ubuntu box, found some problems: 1. the behavior of omnicompletion is changed I set completeopt=menu,preview,longest
    Message 1 of 11 , Apr 24 7:50 PM
      Hi,
      I just try the fresh vim7f Beta on my ubuntu box, found some problems:
      1. the behavior of omnicompletion is changed
      I set
      completeopt=menu,preview,longest
      in vim7d beta, when I input something then press <C-X><C-O>, the
      completion menu shows up, then as I input more characters, the content
      of the completion menu is changed and the first entry in the menu is
      highlighted. But in vim7f, all things work except the first entry is not
      highlighted. Is it a bug or a design?
      2. one problem with syntax highlight
      Open help by :help command, the '|' is missing, that is
      |usr_01.txt| now becomes usr_01.txt. This happens in mud colorscheme,
      but does not occur in desert colorscheme. Maybe this is a problem of the
      colorscheme, but it works well before(at least in vim7d and vim6.x). It
      means there is something about syntax highlight changed in vim7f. Is it
      intended?
      Thanks.

      BR
      Vincent
    • Bram Moolenaar
      ... This is by design. Some people mentioned that when using the longest common string the first entry should not be selected. Now you can use CTRL-N to
      Message 2 of 11 , Apr 25 2:32 AM
        Vincent Linsong wrote:

        > I just try the fresh vim7f Beta on my ubuntu box, found some problems:
        > 1. the behavior of omnicompletion is changed
        > I set
        > completeopt=menu,preview,longest
        > in vim7d beta, when I input something then press <C-X><C-O>, the
        > completion menu shows up, then as I input more characters, the content
        > of the completion menu is changed and the first entry in the menu is
        > highlighted. But in vim7f, all things work except the first entry is not
        > highlighted. Is it a bug or a design?

        This is by design. Some people mentioned that when using the longest
        common string the first entry should not be selected. Now you can use
        CTRL-N to select the first entry. Previously you would need to do
        CTRL-N CTRL-P to get the first entry.

        > 2. one problem with syntax highlight
        > Open help by :help command, the '|' is missing, that is
        > |usr_01.txt| now becomes usr_01.txt. This happens in mud colorscheme,
        > but does not occur in desert colorscheme. Maybe this is a problem of the
        > colorscheme, but it works well before(at least in vim7d and vim6.x). It
        > means there is something about syntax highlight changed in vim7f. Is it
        > intended?

        This is intentional. The || characters mark tags, but can make it more
        difficult to read the command being explained.

        --
        ** Hello and Welcome to the Psychiatric Hotline **
        If you are obsessive-compulsive, please press 1 repeatedly.
        If you are co-dependent, please ask someone to press 2.
        If you have multiple personalities, please press 3, 4, 5 and 6.
        If you are paranoid-delusional, we know who you are and what you want
        - just stay on the line so we can trace the call.
        If you are schizophrenic, listen carefully and a little voice will
        tell you which number to press next.
        If you are manic-depressive, it doesn't matter which number you press
        - no one will answer.
        If you suffer from panic attacks, push every button you can find.
        If you are sane, please hold on - we have the rest of humanity on the
        other line and they desparately want to ask you a few questions.

        /// 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 ///
      • Linsong
        ... I use the omnicompletion like this: I set completeopt=menu,preview,longest . Now consider I input some characters of a function s name, for example, the
        Message 3 of 11 , Apr 25 4:15 AM
          Bram Moolenaar wrote:

          >Vincent Linsong wrote:
          >
          >
          >
          >> I just try the fresh vim7f Beta on my ubuntu box, found some problems:
          >> 1. the behavior of omnicompletion is changed
          >> I set
          >> completeopt=menu,preview,longest
          >> in vim7d beta, when I input something then press <C-X><C-O>, the
          >>completion menu shows up, then as I input more characters, the content
          >>of the completion menu is changed and the first entry in the menu is
          >>highlighted. But in vim7f, all things work except the first entry is not
          >>highlighted. Is it a bug or a design?
          >>
          >>
          >
          >This is by design. Some people mentioned that when using the longest
          >common string the first entry should not be selected. Now you can use
          >CTRL-N to select the first entry. Previously you would need to do
          >CTRL-N CTRL-P to get the first entry.
          >
          >
          I use the omnicompletion like this:
          I set completeopt=menu,preview,longest . Now consider I input some
          characters of a function's name, for example, the function's name is
          'helloWorld' and I input 'hel'. I am not glad to remember the exact
          function name, so I invoke omnicompletion by <C-X><C-O>, then I know
          what is the exact name of the function, instead of press <C-N> or <C-P>
          multiple times to select it from the menu, I choose to input more
          characters and when function's name becomes the top entry on the menu, I
          will press <C-Y> to accept it. I think this way is very convenient and I
          know many intelligence like tools works in this way.
          If others have enough reason to change the behavior, would you like
          to add a new option to make two ways work ? Thanks a lot!

          BR
          Vincent

          >
          >
          >> 2. one problem with syntax highlight
          >> Open help by :help command, the '|' is missing, that is
          >>|usr_01.txt| now becomes usr_01.txt. This happens in mud colorscheme,
          >>but does not occur in desert colorscheme. Maybe this is a problem of the
          >>colorscheme, but it works well before(at least in vim7d and vim6.x). It
          >>means there is something about syntax highlight changed in vim7f. Is it
          >>intended?
          >>
          >>
          >
          >This is intentional. The || characters mark tags, but can make it more
          >difficult to read the command being explained.
          >
          >
          >
        • Bram Moolenaar
          ... I think the current behavior is best for most people. For you, instead of pressing CTRL-Y you can use CTRL-N and continue typing, that normally stops
          Message 4 of 11 , Apr 25 9:11 AM
            Vincent Linsong wrote:

            > >This is by design. Some people mentioned that when using the longest
            > >common string the first entry should not be selected. Now you can use
            > >CTRL-N to select the first entry. Previously you would need to do
            > >CTRL-N CTRL-P to get the first entry.
            >
            > I use the omnicompletion like this:
            > I set completeopt=menu,preview,longest . Now consider I input some
            > characters of a function's name, for example, the function's name is
            > 'helloWorld' and I input 'hel'. I am not glad to remember the exact
            > function name, so I invoke omnicompletion by <C-X><C-O>, then I know
            > what is the exact name of the function, instead of press <C-N> or <C-P>
            > multiple times to select it from the menu, I choose to input more
            > characters and when function's name becomes the top entry on the menu, I
            > will press <C-Y> to accept it. I think this way is very convenient and I
            > know many intelligence like tools works in this way.
            > If others have enough reason to change the behavior, would you like
            > to add a new option to make two ways work ? Thanks a lot!

            I think the current behavior is best for most people. For you, instead
            of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
            stops completion.

            I don't know other tools that use CTRL-Y... You might be tempted to hit
            <Enter> to accept the current match, we had that discussion before.
            That kind of use simply doesn't go well with "longest".

            --
            DEAD PERSON: I don't want to go in the cart!
            CUSTOMER: Oh, don't be such a baby.
            MORTICIAN: I can't take him...
            DEAD PERSON: I feel fine!
            CUSTOMER: Oh, do us a favor...
            MORTICIAN: I can't.
            The Quest for the Holy Grail (Monty Python)

            /// 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 ///
          • Linsong
            Bram Moolenaar wrote: Hi, Bram Thanks for your reply! ... If I press CTRL-N, then what I inputed will be replaced with the first entry of the completion menu,
            Message 5 of 11 , Apr 25 7:35 PM
              Bram Moolenaar wrote:

              Hi, Bram
              Thanks for your reply!

              >Vincent Linsong wrote:
              >
              >
              >
              >>>This is by design. Some people mentioned that when using the longest
              >>>common string the first entry should not be selected. Now you can use
              >>>CTRL-N to select the first entry. Previously you would need to do
              >>>CTRL-N CTRL-P to get the first entry.
              >>>
              >>>
              >> I use the omnicompletion like this:
              >> I set completeopt=menu,preview,longest . Now consider I input some
              >>characters of a function's name, for example, the function's name is
              >>'helloWorld' and I input 'hel'. I am not glad to remember the exact
              >>function name, so I invoke omnicompletion by <C-X><C-O>, then I know
              >>what is the exact name of the function, instead of press <C-N> or <C-P>
              >>multiple times to select it from the menu, I choose to input more
              >>characters and when function's name becomes the top entry on the menu, I
              >>will press <C-Y> to accept it. I think this way is very convenient and I
              >>know many intelligence like tools works in this way.
              >> If others have enough reason to change the behavior, would you like
              >>to add a new option to make two ways work ? Thanks a lot!
              >>
              >>
              >
              >I think the current behavior is best for most people. For you, instead
              >of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
              >stops completion.
              >
              >
              If I press CTRL-N, then what I inputed will be replaced with the first
              entry of the completion menu, but that is not what I want.

              >I don't know other tools that use CTRL-Y...
              >
              I think my sentence is a little confusing. I don't mean CTRL-Y is very
              common but the way to use completion.

              > You might be tempted to hit
              ><Enter> to accept the current match, we had that discussion before.
              >That kind of use simply doesn't go well with "longest".
              >
              My main point is: I don't want to select entry in the completion menu by
              pressing CTRL-N or CTRL-P, instead, I want to input enough characters to
              make correct entry become the first entry and it is highlighted, then I
              can use CTRL-Y(yes, I have mapped <Enter> to CTRL-Y since I am tempted
              to use <Enter>) to confirm the completion.

              Thanks again.

              Best regards,
              Vincent
            • Martin Stubenschrott
              ... Then just :inoremap That should should do what you expect now (untested). I really disliked old behavior, and think the current completion
              Message 6 of 11 , Apr 26 2:16 AM
                On Wed, Apr 26, 2006 at 10:35:30AM +0800, Linsong wrote:

                > My main point is: I don't want to select entry in the completion menu by
                > pressing CTRL-N or CTRL-P, instead, I want to input enough characters to
                > make correct entry become the first entry and it is highlighted, then I
                > can use CTRL-Y(yes, I have mapped <Enter> to CTRL-Y since I am tempted
                > to use <Enter>) to confirm the completion.

                Then just :inoremap <C-Y> <C-N><C-Y>
                That should should do what you expect now (untested).

                I really disliked old behavior, and think the current completion with
                'longest' and ctrl-n is what it should behave like since it's more
                logical as you only need <c-x><c-o> and <c-n> and not yet another key like
                <c-y>.
              • Linsong
                ... Thanks, martin, it works well. ... But I am still not very clear why the first entry in the menu is not highlighted? Is it not reasonable? I don t get any
                Message 7 of 11 , Apr 26 2:39 AM
                  Martin Stubenschrott wrote:

                  >On Wed, Apr 26, 2006 at 10:35:30AM +0800, Linsong wrote:
                  >
                  >
                  >
                  >>My main point is: I don't want to select entry in the completion menu by
                  >>pressing CTRL-N or CTRL-P, instead, I want to input enough characters to
                  >>make correct entry become the first entry and it is highlighted, then I
                  >>can use CTRL-Y(yes, I have mapped <Enter> to CTRL-Y since I am tempted
                  >>to use <Enter>) to confirm the completion.
                  >>
                  >>
                  >
                  >Then just :inoremap <C-Y> <C-N><C-Y>
                  >That should should do what you expect now (untested).
                  >
                  >
                  Thanks, martin, it works well.

                  >I really disliked old behavior, and think the current completion with
                  >'longest' and ctrl-n is what it should behave like since it's more
                  >logical as you only need <c-x><c-o> and <c-n> and not yet another key like
                  ><c-y>.
                  >
                  >
                  But I am still not very clear why the first entry in the menu is not
                  highlighted? Is it not reasonable? I don't get any point that
                  highlighting the first entry will make the behavior unreasonable. I
                  think there shoud be an very good reason and I really want to know.
                  Anyone can give some hints? :)

                  Thanks a lot!

                  BR
                  Vincent
                • Bram Moolenaar
                  ... I don t get it. You type characters until the function you were looking for is the first match. Then CTRL-N will select that match and you re done. There
                  Message 8 of 11 , Apr 26 3:52 AM
                    Vincent Linsong wrote:

                    > >>>This is by design. Some people mentioned that when using the longest
                    > >>>common string the first entry should not be selected. Now you can use
                    > >>>CTRL-N to select the first entry. Previously you would need to do
                    > >>>CTRL-N CTRL-P to get the first entry.
                    > >>>
                    > >> I use the omnicompletion like this:
                    > >> I set completeopt=menu,preview,longest . Now consider I input some
                    > >>characters of a function's name, for example, the function's name is
                    > >>'helloWorld' and I input 'hel'. I am not glad to remember the exact
                    > >>function name, so I invoke omnicompletion by <C-X><C-O>, then I know
                    > >>what is the exact name of the function, instead of press <C-N> or <C-P>
                    > >>multiple times to select it from the menu, I choose to input more
                    > >>characters and when function's name becomes the top entry on the menu, I
                    > >>will press <C-Y> to accept it. I think this way is very convenient and I
                    > >>know many intelligence like tools works in this way.
                    > >> If others have enough reason to change the behavior, would you like
                    > >>to add a new option to make two ways work ? Thanks a lot!
                    > >
                    > >I think the current behavior is best for most people. For you, instead
                    > >of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
                    > >stops completion.
                    >
                    > If I press CTRL-N, then what I inputed will be replaced with the first
                    > entry of the completion menu, but that is not what I want.

                    I don't get it. You type characters until the function you were looking
                    for is the first match. Then CTRL-N will select that match and you're
                    done.

                    There is a conflict between saying that the top entry of the menu is the
                    one you want and CTRL-N not getting what you want.

                    --
                    A poem: read aloud:

                    <> !*''# Waka waka bang splat tick tick hash,
                    ^"`$$- Caret quote back-tick dollar dollar dash,
                    !*=@$_ Bang splat equal at dollar under-score,
                    %*<> ~#4 Percent splat waka waka tilde number four,
                    &[]../ Ampersand bracket bracket dot dot slash,
                    |{,,SYSTEM HALTED Vertical-bar curly-bracket comma comma CRASH.

                    Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids, MI.)

                    /// 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 ///
                  • Ilya
                    ... I think, that you are saying that you want to highlight entry that is not inserted into buffer. And Bram and others, assume that if entry is highlighted
                    Message 9 of 11 , Apr 26 4:52 AM
                      Linsong wrote:
                      > Martin Stubenschrott wrote:
                      >
                      > But I am still not very clear why the first entry in the menu is not
                      > highlighted? Is it not reasonable? I don't get any point that
                      > highlighting the first entry will make the behavior unreasonable. I
                      > think there shoud be an very good reason and I really want to know.
                      > Anyone can give some hints? :)
                      I think, that you are saying that you want to highlight entry that is
                      not inserted into buffer. And Bram and others, assume that if entry is
                      highlighted than it means that it is inserted. That's why <C-N>
                      highlights entry - because it inserts it into buffer.
                    • Ilya
                      ... If I m right, maybe it would be good to have two highlights - one that would show an entry that would be inserted on and another one that would
                      Message 10 of 11 , Apr 26 4:56 AM
                        Ilya wrote:
                        > Linsong wrote:
                        >> Martin Stubenschrott wrote:
                        >>
                        >> But I am still not very clear why the first entry in the menu is not
                        >> highlighted? Is it not reasonable? I don't get any point that
                        >> highlighting the first entry will make the behavior unreasonable. I
                        >> think there shoud be an very good reason and I really want to know.
                        >> Anyone can give some hints? :)
                        > I think, that you are saying that you want to highlight entry that is
                        > not inserted into buffer. And Bram and others, assume that if entry
                        > is highlighted than it means that it is inserted. That's why <C-N>
                        > highlights entry - because it inserts it into buffer.
                        >
                        If I'm right, maybe it would be good to have two highlights - one that
                        would show an entry that would be inserted on <C-Y> and another one that
                        would should an entry that is currently inserted in a buffer.
                      • Linsong
                        ... Sorry, my words is a little confusing. ... In fact, I input more characters until the function I am looking for is the the first match, under this case, I
                        Message 11 of 11 , Apr 26 8:42 PM
                          Bram Moolenaar wrote:

                          >Vincent Linsong wrote:
                          >
                          >
                          >
                          >>>>>This is by design. Some people mentioned that when using the longest
                          >>>>>common string the first entry should not be selected. Now you can use
                          >>>>>CTRL-N to select the first entry. Previously you would need to do
                          >>>>>CTRL-N CTRL-P to get the first entry.
                          >>>>>
                          >>>>>
                          >>>>>
                          >>>> I use the omnicompletion like this:
                          >>>> I set completeopt=menu,preview,longest . Now consider I input some
                          >>>>characters of a function's name, for example, the function's name is
                          >>>>'helloWorld' and I input 'hel'. I am not glad to remember the exact
                          >>>>function name, so I invoke omnicompletion by <C-X><C-O>, then I know
                          >>>>what is the exact name of the function, instead of press <C-N> or <C-P>
                          >>>>multiple times to select it from the menu, I choose to input more
                          >>>>characters and when function's name becomes the top entry on the menu, I
                          >>>>will press <C-Y> to accept it. I think this way is very convenient and I
                          >>>>know many intelligence like tools works in this way.
                          >>>> If others have enough reason to change the behavior, would you like
                          >>>>to add a new option to make two ways work ? Thanks a lot!
                          >>>>
                          >>>>
                          >>>I think the current behavior is best for most people. For you, instead
                          >>>of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
                          >>>stops completion.
                          >>>
                          >>>
                          >>If I press CTRL-N, then what I inputed will be replaced with the first
                          >>entry of the completion menu, but that is not what I want.
                          >>
                          >>
                          >
                          >I don't get it.
                          >
                          Sorry, my words is a little confusing.

                          >You type characters until the function you were looking
                          >for is the first match. Then CTRL-N will select that match and you're
                          >done.
                          >
                          >
                          In fact, I input more characters until the function I am looking for is
                          the the first match, under this case, I want to select the first match
                          and make the menu disappear(why? because to my impression, the
                          completion is not done until I select some entry and the completion menu
                          disappears). But now I have to press CTRL-N CTRL-E to do so, that is not
                          very convenient.

                          Yes, I can make a map make it easier, for example I have the following
                          match:
                          if exists('*pumvisible')
                          inoremap <Enter> <C-R>=pumvisible() ? "\<lt>C-y>" :
                          "\<lt>Enter>"<CR>
                          endif
                          It works very well under vim7d Beta with
                          completeopt=menu,preview,longest, this map just makes Enter as the
                          confirm key instead of <C-Y> since I am tempted to use Enter as the
                          confirm key. It works in the following two cases:
                          case 1: I input charactes and when the first match is what I want, I
                          just press Enter to confirm, what I inputed is completed and the
                          completion menu disappear
                          case 2: I use CTRL-N or CTRL-P to change the highlighted entry to
                          the one I want, then I press Enter to confirm.
                          But in vim7f Beta, since the first match has not been highlighted
                          any more, the map does not work in case 1. I can modify it a little to
                          make it work:
                          if exists('*pumvisible')
                          inoremap <Enter> <C-R>=pumvisible() ? "\<lt>C-n>\<lt>C-y>" :
                          "\<lt>Enter>"<CR>
                          endif
                          But it will not work in case 2. I can not work out a way to make it
                          work in case 1 and case 2.
                          I know what is the reason of the change between vim7f and vim7d and I
                          think it is very reasonable. But I still suggest there should be an
                          option to highlight the first match of completion menu.

                          Thanks.

                          BR
                          Vincent


                          >There is a conflict between saying that the top entry of the menu is the
                          >one you want and CTRL-N not getting what you want.
                          >
                          >
                        Your message has been successfully submitted and would be delivered to recipients shortly.