Peter Hodge wrote: > Backspacing or typing while the Vim 7 Insert completion popup window > is running is very difficult when the completion list is long or comes > from many sources. Because the popup menu refreshes itself on each > backspace, each keystroke can take up to half a second to appear, and > it was actually easier to hit escape and re-enter insert mode to stop > the popup menu guzzling CPU cycles on each keystroke. > > Miraculously, it was very easy for me to create an extra value for > 'completeopt' which stops the popup menu as soon as something is > backspaced or added, and allows me to have the popup menu turned on, > but without it getting in my way as I type. > > Do you think it would be worthwhile adding this patch into Vim? > > regards, > Peter > > > > Patch for the online help: > ========================== > > *** /usr/share/vim/vim70/doc/options.txt Wed Sep 13 13:44:48 2006 > --- doc/options.txt Wed Sep 13 14:59:04 2006 > *************** > *** 1660,1665 **** > --- 1660,1671 ---- > preview Show extra information about the currently selected > completion in the preview window. > > + stop Stop Insert mode completion and close the popup menu when > + you start typing again, or when you backspace part of the > + completed text. This is useful when the completion list > + is taking too long to refresh its contents while you are > + typing. > + > *'confirm'* *'cf'* *'noconfirm'* *'nocf'* > 'confirm' 'cf' boolean (default off)
The word "stop" doesn't really describe well what its effect is. There are other situations where you would like to stop completion, not only with backspace. Especially when using "longest". I would suggest using a regexp pattern for this. So that you could do: :set completeopt+=stop=[-.[:backspace:]] This would stop completion when typing backspace, '.' or '-'. -- Q: How do you tell the difference between a female cat and a male cat? A: You ask it a question and if HE answers, it's a male but, if SHE answers, it's a female. /// 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 ///