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

vim7.0: End completion mode when typing a new/unknown word

Expand Messages
  • Thomas
    Hi, Say the buffer contains: foo or foo1 foo2 and say I type: foo and now . As soon as there is a possible completion, I switch to (omni)completion mode
    Message 1 of 1 , Feb 28, 2007
    • 0 Attachment
      Hi,

      Say the buffer contains:

      foo

      or

      foo1
      foo2

      and say I type:

      foo

      and now <c-p>.

      As soon as there is a possible completion, I switch to (omni)completion
      mode (no idea if this is the official name for it). When there are more
      than one possible completions I get a menu and so.

      So far, so good. Now when I simply continue typing (say: a), vim still
      searches for completions although there are no possible completions for
      "fooa".

      Is there a way to make vim automatically leave completion mode when I
      start typing and there are no known competions for the word?

      I'm not sure if I was able to understand the problem and I assume there
      already is an option for this -- which I simply wasn't able to find. Is
      there such an option?

      The only relevant setting in my vimrc file is:
      set completeopt+=longest

      autocmd FileType * execute "setlocal
      complete+="."k$HOME/vimfiles/syntax/".getbufvar("%","current_syntax").".vim"

      autocmd FileType * execute "setlocal
      complete+="."k$VIMRUNTIME/syntax/".getbufvar("%","current_syntax").".vim"

      Regards,
      Thomas.
    Your message has been successfully submitted and would be delivered to recipients shortly.