Reputation: 23
I just enabled omnicomplete function(I'm using Vim7.3) and I want to try it out so I wrote a test.c:
int main
{
int appleInc;
app_
}
"_"is where the current cursor is.But when I hit Ctrl X or Ctrl O, nothing pops up. It just say pattern not found.
I'm a bit confused by this. Doesn't it at least supposed to support the variable autocompletion? This is what I add in the .vimrc:
filetype plugin on
ofu=syntaxcomplete#Complete
Upvotes: 1
Views: 1687
Reputation: 196476
The correct shortcut for omnicompletion is <C-x><C-o>
that's <C-x>
then <C-o>
.
In this case, you want <C-n>
/<C-p>
to complete with a keyword from the current buffer and other sources or <C-x><C-n>
/<C-x><C-p>
to complete with a keyword from the current buffer only.
See :help ins-completion
.
Upvotes: 1