Dominique Pelle wrote:

> When output of a Vim commands spans multiple screens, it is
> possible to press 'f', <PageDown> or <Space> to move down
> page by page until the bottom of the output.  But the keys
> behave differently when reaching the bottom of the output:
> 
> - pressing 'f' will stop at the prompt "Press ENTER or
>   type command to continue" when reaching the bottom of the
>   output.
> - pressing <Space> or <PageDown> will quit when reaching
>   the bottom of the output.
> 
> I often press <PageUp>, <PageDown> to scroll page by page
> since it's the most intuitive keys for this purpose.  But the
> default behavior to quit when reaching the bottom is rather
> counter intuitive and can be irritating (list is then lost).

There is an intentional difference between the various keys, so that you
can use the one that does what you intent.

> Here is an example to illustrate it:
> 
>   # Open many files in Vim...
>   $ cd vim7/src/ ; vim *.[ch]
> 
>   # List all buffers and show output page by page...
>   :ls
>   (then press <PageDown> to go through the output of :ls
>   command page by page, notice that pressing <PageDown>
>   at the bottom quits from the output of command).
> 
> I'm not sure whether this current behavior for <PageDown> is
> intentional or whether it is a bug.  It looks like a bug and I
> think it should behave like pressing 'f'.  In any case, it not
> documented in ":help more-prompt".

On the other hand, if there are only a couple of lines of output, then
it's perhaps more logical that the <PageDown> is taken as the next
command, thus scrolls down the text of the window.

> But even more counter-intuitive:
> - pressing <PageUp> moves page by page upward (good) when
>   pressed at the bottom (i.e. when seeing "Press ENTER or
>   type command to continue"), then pressing <PageUp> will
>   quit the output (!?)

And scroll up the text in the buffer.

> - pressing <BS> moves one line up but when when pressed
>   at the bottom it causes to quit the output (counter-intuitive).
> - pressing 'g' goes to the top and pressing 'G' goes to the
>   bottom.  When when pressing 'G' while at the bottom, it
>   causes to quit the output (counter-intuitive).
> 
> Attached patch (from Vim-7.2.148) makes the following simple
> changes:
> 
> - pressing <PageDown>, <PageUp>, <BS>, 'G' no longer exits
>   when pressed at the bottom of message output.
> - updated documentation (doc/message.txt) to clarify expected
>   behavior which was unclear for those keys.
> 
> Patch makes those keys more user friendly in my opinion.
> Let me know what you think of the patch.

I think you need to look at this also with a very short output, e.g.,
doing ":ls" and getting only three lines of output.  Then the key you
type is more likely to be a command to be performed next.

-- 
A computer programmer is a device for turning requirements into
undocumented features.  It runs on cola, pizza and Dilbert cartoons.
                                        Bram Moolenaar

 /// Bram Moolenaar -- [email protected] -- 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui