> > It seems that Vim does not have the same behavior depending on whether > > "longest" is used as a complete option. > > > > When using "set completeopt=menu", if I use <c-n> and there's only one > > possible completion, the current word is completed without showing the > > menu and I'm immediately out of the completion mode. > > > > When using "set completeopt=menu,longest", if I use <c-n> and there's > > only one possible completion, the current word is completed without > > showing the menu and I'm stuck into completion mode. The status line > > says "-- Keyword completion (^N^P) Back at original" and even if I > > type new characters (except a space), I can no longer use <c-n> until > > I stop the completion mode by hand (<c-e>). While this may not be a > > problem with text files, it is very annoying when programming. > > > > For instance, when typing: > > > > myTab[myIndex] > > > > If I use <c-n> to complete "myTab" and that's the only possibility, > > then I cannot use it to complete "myIndex" unless I hit <c-e>. > > > > IMHO, either Vim should get out of the completion mode after the first > > completion, or it should consider that a character such as '[' stops > > the completion mode (as a space does). > > What version of Vim? Especially patch 7.1.145 matters.
I was using v7.1.56 (Ubuntu Gutsy). I've just tested with v7.1.241 and this version indeed correctly stops the completion when a new character is typed. Sorry for the outdated report, I should have tested with the latest version first. Lesson learnt. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
