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

BUG: Vim doesn't find single-letter help tags even though they are in $VIMRUNTIME/doc/tags

Expand Messages
  • Tony Mechelynck
    Vim mostly doesn t find single-letter help tags even though they are in $VIMRUNTIME/doc/tags (as found by looking under :help help-tags ) ... instead of *A*
    Message 1 of 9 , Aug 3, 2008
    • 0 Attachment
      Vim mostly doesn't find single-letter help tags even though they are in
      $VIMRUNTIME/doc/tags (as found by looking under ":help help-tags")

      Examples:
      :help A finds *'A* in motion.txt
      instead of *A* in insert.txt
      :help B finds *b:match_iniBR* in $VIM/vimfiles/doc/matchit.txt
      instead of *B* in motion.txt
      :help C finds *'t_CS'* in term.txt
      instead of *C* in change.txt
      etc.
      :help x finds *-x* in starting.txt
      instead of *x* in change.txt
      :help y finds *-y* in starting.txt
      instead of *y* in change.txt
      :help z finds *z* in index.txt (OK)

      Notes:
      - I'm using 'ignorecase'
      - The doc/tags file includes none of the following lines, which ctags
      writes near the top of its output:
      !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to
      lines/
      !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
      !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@.../
      !_TAG_PROGRAM_NAME Exuberant Ctags //
      !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
      !_TAG_PROGRAM_VERSION 5.7 //

      Looks to me as if Vim was using the first tag found with even a partial
      match, instead of always preferring a full match.

      After reading ":help {subject}" attentively, I still think this is a
      bug, otherwise there's no way to match the helptags A B C ... x y
      mentioned above.


      Best regards,
      Tony.
      --
      "Nuclear war would mean abolition of most comforts, and disruption of
      normal routines, for children and adults alike."
      -- Willard F. Libby, "You *Can* Survive Atomic Attack"

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • sc
      ... i see the same thing, and i am _not_ ignoring case sc --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_dev
      Message 2 of 9 , Aug 3, 2008
      • 0 Attachment
        On Sunday 03 August 2008 19:29, Tony Mechelynck wrote:
        >
        > Vim mostly doesn't find single-letter help tags even though they are in
        > $VIMRUNTIME/doc/tags (as found by looking under ":help help-tags")
        >
        > Examples:
        > :help A finds *'A* in motion.txt
        > instead of *A* in insert.txt
        > :help B finds *b:match_iniBR* in $VIM/vimfiles/doc/matchit.txt
        > instead of *B* in motion.txt
        > :help C finds *'t_CS'* in term.txt
        > instead of *C* in change.txt
        > etc.
        > :help x finds *-x* in starting.txt
        > instead of *x* in change.txt
        > :help y finds *-y* in starting.txt
        > instead of *y* in change.txt
        > :help z finds *z* in index.txt (OK)
        >
        > Notes:
        > - I'm using 'ignorecase'
        > - The doc/tags file includes none of the following lines, which ctags
        > writes near the top of its output:
        > !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to
        > lines/
        > !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
        > !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@.../
        > !_TAG_PROGRAM_NAME Exuberant Ctags //
        > !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
        > !_TAG_PROGRAM_VERSION 5.7 //
        >
        > Looks to me as if Vim was using the first tag found with even a partial
        > match, instead of always preferring a full match.
        >
        > After reading ":help {subject}" attentively, I still think this is a
        > bug, otherwise there's no way to match the helptags A B C ... x y
        > mentioned above.
        >
        >
        > Best regards,
        > Tony.

        i see the same thing, and i am _not_ ignoring case

        sc



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... I get buggy but different behaviour! ... It s a newly introduced bug too. I ll see if I can find it... Yep. It was introduced with Vim 7.2b. The following
        Message 3 of 9 , Aug 3, 2008
        • 0 Attachment
          Tony Mechelynck wrote:
          > Vim mostly doesn't find single-letter help tags even though they are in
          > $VIMRUNTIME/doc/tags (as found by looking under ":help help-tags")
          >
          > Examples:

          I get buggy but different behaviour!

          > Looks to me as if Vim was using the first tag found with even a partial
          > match, instead of always preferring a full match.
          >
          > After reading ":help {subject}" attentively, I still think this is a
          > bug, otherwise there's no way to match the helptags A B C ... x y
          > mentioned above.

          It's a newly introduced bug too.

          I'll see if I can find it...

          Yep. It was introduced with Vim 7.2b. The following patch introduces it,
          consequently reversing the patch fixes it. It's pretty obvious what the
          problem is, and simple to fix, but I'll leave it to Bram to decide
          exactly how he wants to fix it.

          Ben.



          diff -r e6e5d578b132 -r 0b95aebcd055 runtime/doc/cmdline.txt
          --- a/runtime/doc/cmdline.txt Mon Jul 14 04:36:41 2008 +1000
          +++ b/runtime/doc/cmdline.txt Mon Jul 14 04:46:54 2008 +1000
          @@ -369,7 +369,9 @@
          - Variable and function names: Only after a ":if", ":call" or similar command.

          When Vim was compiled with the |+cmdline_compl| feature disabled, only file
          -names, directories and help items can be completed.
          +names, directories and help items can be completed. The number of help item
          +matches is limited (currently to 300) to avoid a long delay when there are
          +very many matches.

          These are the commands that can be used:

          diff -r e6e5d578b132 -r 0b95aebcd055 src/ex_cmds.c
          --- a/src/ex_cmds.c Mon Jul 14 04:36:41 2008 +1000
          +++ b/src/ex_cmds.c Mon Jul 14 04:46:54 2008 +1000
          @@ -5892,7 +5892,7 @@
          flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
          if (keep_lang)
          flags |= TAG_KEEP_LANG;
          - if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
          + if (find_tags(IObuff, num_matches, matches, flags, TAG_MANY, NULL) == OK
          && *num_matches > 0)
          /* Sort the matches found on the heuristic number that is after the
          * tag name. */



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Ian Kelling
          I wrote the patch that introduced the bug and I will be happy to fix it. It was written to solve the problem that doing :h would take a long time to
          Message 4 of 9 , Aug 4, 2008
          • 0 Attachment
            I wrote the patch that introduced the bug and I will be happy to fix
            it. It was
            written to solve the problem that doing :h <ctrl-d> would take a long
            time to
            show every help tag. It could be changed so that it only limits it in
            that
            specific case. Do you have any other ideas? If not, I will do that
            one.

            - Ian Kelling

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Bram Moolenaar
            ... Yeah, the problem is that the number of tags is restricted before sorting them on relevance. Try the patch below. ... *************** *** 5897,5908 ****
            Message 5 of 9 , Aug 4, 2008
            • 0 Attachment
              Ben Schmidt wrote:

              > Tony Mechelynck wrote:
              > > Vim mostly doesn't find single-letter help tags even though they are in
              > > $VIMRUNTIME/doc/tags (as found by looking under ":help help-tags")
              > >
              > > Examples:
              >
              > I get buggy but different behaviour!
              >
              > > Looks to me as if Vim was using the first tag found with even a partial
              > > match, instead of always preferring a full match.
              > >
              > > After reading ":help {subject}" attentively, I still think this is a
              > > bug, otherwise there's no way to match the helptags A B C ... x y
              > > mentioned above.
              >
              > It's a newly introduced bug too.
              >
              > I'll see if I can find it...
              >
              > Yep. It was introduced with Vim 7.2b. The following patch introduces it,
              > consequently reversing the patch fixes it. It's pretty obvious what the
              > problem is, and simple to fix, but I'll leave it to Bram to decide
              > exactly how he wants to fix it.

              Yeah, the problem is that the number of tags is restricted before
              sorting them on relevance. Try the patch below.


              *** ../vim-7.2b.026/src/ex_cmds.c Thu Jul 24 21:30:10 2008
              --- src/ex_cmds.c Mon Aug 4 21:15:00 2008
              ***************
              *** 5897,5908 ****
              flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
              if (keep_lang)
              flags |= TAG_KEEP_LANG;
              ! if (find_tags(IObuff, num_matches, matches, flags, TAG_MANY, NULL) == OK
              && *num_matches > 0)
              /* Sort the matches found on the heuristic number that is after the
              * tag name. */
              qsort((void *)*matches, (size_t)*num_matches,
              sizeof(char_u *), help_compare);
              return OK;
              }

              --- 5897,5913 ----
              flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
              if (keep_lang)
              flags |= TAG_KEEP_LANG;
              ! if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
              && *num_matches > 0)
              + {
              /* Sort the matches found on the heuristic number that is after the
              * tag name. */
              qsort((void *)*matches, (size_t)*num_matches,
              sizeof(char_u *), help_compare);
              + /* Delete more than TAG_MANY to reduce the size of the listing. */
              + while (*num_matches > TAG_MANY)
              + vim_free((*matches)[--*num_matches]);
              + }
              return OK;
              }



              --
              TALL KNIGHT: Firstly. You must get us another shrubbery!
              OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni!
              ARTHUR: Not another shrubbery -
              "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

              /// 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 ///

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Tony Mechelynck
              On 04/08/08 22:08, Bram Moolenaar wrote: [...] ... [...] Single-letter help tags are found again; and my computer is faster than me by a big enough margin that
              Message 6 of 9 , Aug 4, 2008
              • 0 Attachment
                On 04/08/08 22:08, Bram Moolenaar wrote:
                [...]
                > Yeah, the problem is that the number of tags is restricted before
                > sorting them on relevance. Try the patch below.
                >
                >
                > *** ../vim-7.2b.026/src/ex_cmds.c Thu Jul 24 21:30:10 2008
                > --- src/ex_cmds.c Mon Aug 4 21:15:00 2008
                [...]

                Single-letter help tags are found again; and my computer is faster than
                me by a big enough margin that I don't notice any delay on ":h A" etc.
                ;-) On ":h A<Ctrl-D>" I wait about one second (which is acceptable) then
                I get one full screen plus one line of matches (with lines=48
                columns=142). As expected, the "full match" is now first.

                With the "tiny" console-only version Ctrl-D seems to go slightly faster
                but of course there are fewer matches per screen (lines=43 columns=80).

                Here are the "version" listings and the executable sizes (before and
                after strip) for both builds:

                ========================================================================
                VIM - Vi IMproved 7.2b BETA (2008 Jul 13, compiled Aug 4 2008 23:59:06)
                Included patches: 1-26
                Modified by Bill McCarthy (float), Bram Moolenaar (helptags)
                Compiled by antoine.mechelynck@...
                Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
                +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
                +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
                +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui
                +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search
                +farsi +file_in_path +find_in_path +float +folding -footer +fork()
                +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap
                +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
                +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm
                +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang
                -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript
                +printer +profile +python +quickfix +reltime +rightleft +ruby
                +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
                +tag_binary -tag_old_static -tag_any_white +tcl +terminfo +termresponse
                +textobjects +title +toolbar +user_commands +vertsplit +virtualedit
                +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
                +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard
                +xterm_save
                system vimrc file: "$VIM/vimrc"
                user vimrc file: "$HOME/.vimrc"
                user exrc file: "$HOME/.exrc"
                system gvimrc file: "$VIM/gvimrc"
                user gvimrc file: "$HOME/.gvimrc"
                system menu file: "$VIMRUNTIME/menu.vim"
                fall-back for $VIM: "/usr/local/share/vim"
                Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
                -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
                -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
                -I/usr/lib/glib-2.0/include -I/usr/include/freetype2
                -I/usr/include/libpng12 -DORBIT2=1 -pthread
                -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0
                -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1
                -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0
                -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0
                -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include
                -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
                -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0
                -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2
                -I/usr/include/pango-1.0 -I/usr/include/gail-1.0
                -I/usr/include/freetype2 -I/usr/include/atk-1.0
                -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/libpng12
                -O2 -fno-strength-reduce -Wall -D_REENTRANT -D_GNU_SOURCE
                -DPERL_USE_SAFE_PUTENV -DDEBUGGING -D_LARGEFILE_SOURCE
                -D_FILE_OFFSET_BITS=64
                -I/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
                -I/usr/include/python2.5 -pthread -I/usr/include
                -D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/i586-linux
                Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E
                -Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
                -L/usr/local/lib -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
                -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0
                -lgmodule-2.0 -lglib-2.0 -lgnomeui-2 -lbonoboui-2 -lgnomevfs-2
                -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation
                -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
                -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgconf-2
                -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lXt
                -lncurses -lacl -lgpm -Wl,-E
                -Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
                -L/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE -lperl -lutil -lc
                -L/usr/lib/python2.5/config -lpython2.5 -lutil -Xlinker -export-dynamic
                -L/usr/lib -ltcl8.5 -lieee -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lm
                ========================================================================
                VIM - Vi IMproved 7.2b BETA (2008 Jul 13, compiled Aug 4 2008 23:52:51)
                Included patches: 1-26
                Modified by Bram Moolenaar (helptags)
                Compiled by antoine.mechelynck@...
                Tiny version without GUI. Features included (+) or not (-):
                -arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
                -clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info
                -comments
                -cryptv -cscope -cursorshape -dialog -diff -digraphs -dnd -ebcdic
                -emacs_tags
                -eval -ex_extra -extra_search -farsi -file_in_path -find_in_path -float
                -folding -footer +fork() -gettext -hangul_input -iconv -insert_expand
                -jumplist
                -keymap -langmap -libcall -linebreak -lispindent -listcmds -localmap -menu
                -mksession -modify_fname -mouse -mouse_dec -mouse_gpm -mouse_jsbterm
                -mouse_netterm -mouse_sysmouse -mouse_xterm -multi_byte -multi_lang
                -mzscheme
                -netbeans_intg -osfiletype -path_extra -perl -printer -profile -python
                -quickfix -reltime -rightleft -ruby -scrollbind -signs -smartindent -sniff
                -statusline -sun_workshop -syntax -tag_binary -tag_old_static -tag_any_white
                -tcl +terminfo -termresponse -textobjects -title -toolbar -user_commands
                -vertsplit -virtualedit -visual -viminfo -vreplace +wildignore -wildmenu
                -windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
                system vimrc file: "$VIM/vimrc"
                user vimrc file: "$HOME/.vimrc"
                user exrc file: "$HOME/.exrc"
                fall-back for $VIM: "/usr/local/share/vim"
                Compilation:
                gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall
                Linking: gcc -L/usr/local/lib -o vi -lm -lncurses
                ========================================================================
                linux:~/.build/vim/vim72b # ls -l src/vim src/tiny/vi `which vim` `which vi`
                -rwxr-xr-x 1 root root 504960 Aug 4 23:58 /usr/local/bin/vi*
                -rwxr-xr-x 1 root root 3114216 Aug 5 00:11 /usr/local/bin/vim*
                -rwxr-xr-x 1 root root 567673 Aug 4 23:53 src/tiny/vi*
                -rwxr-xr-x 1 root root 3471156 Aug 5 00:02 src/vim*


                Best regards,
                Tony.
                --
                All wars are civil wars, because all men are brothers ... Each one owes
                infinitely more to the human race than to the particular country in
                which he was born.
                -- Francois Fenelon

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Ben Schmidt
                ... I question the usefulness of this behaviour, actually. What s the point of having a list of completions if there s only a 30% chance or something that it
                Message 7 of 9 , Aug 5, 2008
                • 0 Attachment
                  Ian Kelling wrote:
                  > I wrote the patch that introduced the bug and I will be happy to fix
                  > it. It was written to solve the problem that doing :h <ctrl-d> would
                  > take a long time to show every help tag. It could be changed so that
                  > it only limits it in that specific case. Do you have any other ideas?
                  > If not, I will do that one.
                  >
                  > - Ian Kelling

                  I question the usefulness of this behaviour, actually. What's the point
                  of having a list of completions if there's only a 30% chance or
                  something that it will contain the entry you actually want, because it's
                  a random selection of the possible completions? If anything, this will
                  lead you to deduce that Vim doesn't have help on a particular topic
                  because CTRL-D presents you with a list that doesn't include that topic.
                  Why would you do :he CTRL-D anyway? The only reason I can think of is if
                  you have no idea what tag you are looking for, and so you want to look
                  through the entire list in the hope that you will recognise it. Deleting
                  items from the list makes this impossible.

                  If you think people absent-mindedly type CTRL-D (or whatever completion
                  key) so often that speed really is an issue for this, I'd sooner have
                  completion completely disabled for short words, or common words (that
                  produce a list above a certain size) rather than an incomplete and
                  therefore misleading list. But I'd sooner just have the old behaviour:
                  some operations do take a long time; we might not like to wait, but
                  breaking the feature isn't a good fix, and sometimes the wait is worth
                  it.

                  Ben.



                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_dev" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Bram Moolenaar
                  ... It s not a random selection, the results are sorted by some kind of scoring. Currently that s based on match length and ignoring case. It doesn t make
                  Message 8 of 9 , Aug 5, 2008
                  • 0 Attachment
                    Ben Schmidt wrote:

                    > Ian Kelling wrote:
                    > > I wrote the patch that introduced the bug and I will be happy to fix
                    > > it. It was written to solve the problem that doing :h <ctrl-d> would
                    > > take a long time to show every help tag. It could be changed so that
                    > > it only limits it in that specific case. Do you have any other ideas?
                    > > If not, I will do that one.
                    > >
                    > > - Ian Kelling
                    >
                    > I question the usefulness of this behaviour, actually. What's the point
                    > of having a list of completions if there's only a 30% chance or
                    > something that it will contain the entry you actually want, because it's
                    > a random selection of the possible completions?

                    It's not a random selection, the results are sorted by some kind of
                    scoring. Currently that's based on match length and ignoring case. It
                    doesn't make sense to show all matches that contain an "a" somewhere.
                    It's sufficient to show the user there are very many matches, and he'll
                    add a letter and try again.

                    > If anything, this will
                    > lead you to deduce that Vim doesn't have help on a particular topic
                    > because CTRL-D presents you with a list that doesn't include that topic.
                    > Why would you do :he CTRL-D anyway? The only reason I can think of is if
                    > you have no idea what tag you are looking for, and so you want to look
                    > through the entire list in the hope that you will recognise it. Deleting
                    > items from the list makes this impossible.

                    This mostly applies to single letter searches. Try finding a two
                    character combination that has more than 300 matches.

                    > If you think people absent-mindedly type CTRL-D (or whatever completion
                    > key) so often that speed really is an issue for this, I'd sooner have
                    > completion completely disabled for short words, or common words (that
                    > produce a list above a certain size) rather than an incomplete and
                    > therefore misleading list. But I'd sooner just have the old behaviour:
                    > some operations do take a long time; we might not like to wait, but
                    > breaking the feature isn't a good fix, and sometimes the wait is worth
                    > it.

                    How about ":he <Tab>", should it list all possible tags? I don't think
                    that is useful. Anyway, this is still slow, so that needs to be fixed.

                    --
                    The Law of VIM:
                    For each member b of the possible behaviour space B of program P, there exists
                    a finite time t before which at least one user u in the total user space U of
                    program P will request b becomes a member of the allowed behaviour space B'
                    (B' <= B).
                    In other words: Sooner or later everyone wants everything as an option.
                    -- Vince Negri

                    /// 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 ///

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_dev" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Tony Mechelynck
                    ... As long as the full match comes first, I don t mind pruning some less relevant matches, especially when completing for one or two letters. It might be
                    Message 9 of 9 , Aug 5, 2008
                    • 0 Attachment
                      On 05/08/08 22:45, Bram Moolenaar wrote:
                      >
                      > Ben Schmidt wrote:
                      >
                      >> Ian Kelling wrote:
                      >>> I wrote the patch that introduced the bug and I will be happy to fix
                      >>> it. It was written to solve the problem that doing :h<ctrl-d> would
                      >>> take a long time to show every help tag. It could be changed so that
                      >>> it only limits it in that specific case. Do you have any other ideas?
                      >>> If not, I will do that one.
                      >>>
                      >>> - Ian Kelling
                      >> I question the usefulness of this behaviour, actually. What's the point
                      >> of having a list of completions if there's only a 30% chance or
                      >> something that it will contain the entry you actually want, because it's
                      >> a random selection of the possible completions?
                      >
                      > It's not a random selection, the results are sorted by some kind of
                      > scoring. Currently that's based on match length and ignoring case. It
                      > doesn't make sense to show all matches that contain an "a" somewhere.
                      > It's sufficient to show the user there are very many matches, and he'll
                      > add a letter and try again.
                      >
                      >> If anything, this will
                      >> lead you to deduce that Vim doesn't have help on a particular topic
                      >> because CTRL-D presents you with a list that doesn't include that topic.
                      >> Why would you do :he CTRL-D anyway? The only reason I can think of is if
                      >> you have no idea what tag you are looking for, and so you want to look
                      >> through the entire list in the hope that you will recognise it. Deleting
                      >> items from the list makes this impossible.
                      >
                      > This mostly applies to single letter searches. Try finding a two
                      > character combination that has more than 300 matches.
                      >
                      >> If you think people absent-mindedly type CTRL-D (or whatever completion
                      >> key) so often that speed really is an issue for this, I'd sooner have
                      >> completion completely disabled for short words, or common words (that
                      >> produce a list above a certain size) rather than an incomplete and
                      >> therefore misleading list. But I'd sooner just have the old behaviour:
                      >> some operations do take a long time; we might not like to wait, but
                      >> breaking the feature isn't a good fix, and sometimes the wait is worth
                      >> it.
                      >
                      > How about ":he<Tab>", should it list all possible tags? I don't think
                      > that is useful. Anyway, this is still slow, so that needs to be fixed.
                      >

                      As long as the full match comes first, I don't mind pruning some "less
                      relevant" matches, especially when completing for one or two letters. It
                      might be better to do the pruning after the sorting, as, I think, your
                      "experimental" patch does, in order to keep all the "best" matches.


                      Best regards,
                      Tony.
                      --
                      Boston State House is the hub of the Solar System. You couldn't pry
                      that out of a Boston man if you had the tire of all creation
                      straightened out for a crowbar.
                      -- O. W. Holmes

                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_dev" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.