我刚刚启用了omnicomplete功能(我正在使用Vim7.3),我想尝试一下,所以我写了一个test.c:
int main
{
int appleInc;
app_
}
“_”是当前光标所在的位置。但是当我按下 Ctrl X 或 Ctrl O 时,什么都没有弹出。它只是说找不到模式。
我对此有点困惑。它至少不应该支持变量自动完成吗?这是我在 .vimrc 中添加的内容:
filetype plugin on
ofu=syntaxcomplete#Complete
我刚刚启用了omnicomplete功能(我正在使用Vim7.3),我想尝试一下,所以我写了一个test.c:
int main
{
int appleInc;
app_
}
“_”是当前光标所在的位置。但是当我按下 Ctrl X 或 Ctrl O 时,什么都没有弹出。它只是说找不到模式。
我对此有点困惑。它至少不应该支持变量自动完成吗?这是我在 .vimrc 中添加的内容:
filetype plugin on
ofu=syntaxcomplete#Complete
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.