Re: completion menu
Chris Allen wrote: On 4/20/06, Linsong <[EMAIL PROTECTED]> wrote: I also think here is a little confusing. Since the user are selecting menu items with /, and at this time, Enter is normally assumed as a confirm of the selection. And I think it is very common a user interface convention. I disagree, using Enter to select an item from a menu which has been reached using / is not a common user interface convention which I have seen. Using Enter to select something from a menu selected with the arrow keys, however, is. I think this adapts nicely to the expectations of both the more advanced and less advanced users. Those who wish to do a minimum of reaching can do so, and those who like lots of hand waving can have their fill. Maybe you are right. But I have pressed Enter whenever I want to confirm a selected menu item for several times without thought. And I just work out a map to make it more convenient for me: if exists('*pumvisible') inoremap =pumvisible() ? "\C-y>" : "\Enter>" endif I think it is worth breaking the compatibility between vim6.x and vim7 since there is no completion menu in vim6.x. This would break compatibility with itself as well, though, as the behaviour of / then varies depending on the value of completeopt. Currently the value can be ignored and that makes it backwards compatible with the expectations of the users (showing the menu is now the default, so changing the behaviour would not obey the principle of least surprise). From a personal perspective, getting used to hitting enter twice at the ends of lines is a very hard thing to do. Regards, Chris Allen Anyway, thanks for your reply :) Best regards, Linsong
Re: completion menu
On 4/20/06, Linsong <[EMAIL PROTECTED]> wrote: > I also think here is a little confusing. Since the user are > selecting menu items with /, and at this time, Enter is > normally assumed as a confirm of the selection. And I think it is very > common a user interface convention. I disagree, using Enter to select an item from a menu which has been reached using / is not a common user interface convention which I have seen. Using Enter to select something from a menu selected with the arrow keys, however, is. I think this adapts nicely to the expectations of both the more advanced and less advanced users. Those who wish to do a minimum of reaching can do so, and those who like lots of hand waving can have their fill. >I think it is worth breaking the compatibility between vim6.x and > vim7 since there is no completion menu in vim6.x. This would break compatibility with itself as well, though, as the behaviour of / then varies depending on the value of completeopt. Currently the value can be ignored and that makes it backwards compatible with the expectations of the users (showing the menu is now the default, so changing the behaviour would not obey the principle of least surprise). >From a personal perspective, getting used to hitting enter twice at the ends of lines is a very hard thing to do. Regards, Chris Allen
Re: completion menu
Bram Moolenaar wrote: Georg Dahn wrote: Ok, let's assume there are several completions, such that you get a menu with . Then if you move the selection with the cursor keys and press , the selected item is being chosen. If you do the same with (instead of using cursor keys), inserts a new line. I think, this is confusing. Is this behavior intentional or is it a bug? This is intentional, it was discussed recently. This is a compromise between different expectations from different users. People who used CTRL-N/CTRL-P in Vim 6.4 expect the to be inserted, since that is what happened in older versions. People who are using cursor keys to select an item in the popup menu mostly expect to accept the selected match. That's why the behavior of depends on what you did earlier. Hi, I also think here is a little confusing. Since the user are selecting menu items with /, and at this time, Enter is normally assumed as a confirm of the selection. And I think it is very common a user interface convention. I think it is worth breaking the compatibility between vim6.x and vim7 since there is no completion menu in vim6.x. Best regards, Vincent
Re: completion menu flicker
Nicolas Weber wrote: > I sent this comment in a reply to another mail, seems it got lost. I'm > resending it in a "thread" on its own: > > When I have a completion menu that's long, but still completely fits the > current window (say, 30 entries) and I hit hit or the whole > list is redrawn (ie, it flickers). Is there a technical reason why not > only two lines (the one that was selected before and the one > selected after ) are redrawn? If not, could someone give me a > pointer what I can do to change this? It's quite difficult to figure out what needs to be redrawn. Especially because the selected entry can shift the following text or change syntax highlighting. -- Nobody will ever need more than 640 kB RAM. -- Bill Gates, 1983 Windows 98 requires 16 MB RAM. -- Bill Gates, 1999 Logical conclusion: Nobody will ever need Windows 98. /// 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://www.ICCF.nl ///
Re: completion menu
Hi! I suppose you wanted to send your answer to the list, so I have put the email address of the list as CC. Well, is already used for indentation or inserting spaces/tabs till you are at the next tabstop. So your suggestion would produce much more confusion. However, you can map it, if you want: inoremap Alternatively you can write a function which checks what to do. I personally use the mapping inoremap Best wishes, Georg Praveena M wrote: On 4/16/06, Georg Dahn <[EMAIL PROTECTED]> wrote: Hi! Ok, let's assume there are several completions, such that you get a menu with . Then if you move the selection with the cursor keys and press , the selected item is being chosen. If you do the same with (instead of using cursor keys), inserts a new line. I think, this is confusing. It confused me too. I think, it would be good if completion occurs when press tab (when there are many completions, chooses the first one Thanks Praveen ___ Yahoo! Photos NEW, now offering a quality print service from just 7p a photo http://uk.photos.yahoo.com
Re: completion menu
Georg Dahn wrote: > Ok, let's assume there are several completions, such that you get a menu > with . Then if you move the selection with the cursor keys and > press , the selected item is being chosen. If you do the same > with (instead of using cursor keys), inserts a new line. I > think, this is confusing. > > Is this behavior intentional or is it a bug? This is intentional, it was discussed recently. This is a compromise between different expectations from different users. People who used CTRL-N/CTRL-P in Vim 6.4 expect the to be inserted, since that is what happened in older versions. People who are using cursor keys to select an item in the popup menu mostly expect to accept the selected match. That's why the behavior of depends on what you did earlier. -- >From "know your smileys": |-(Contact lenses, but has lost them /// 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://www.ICCF.nl ///