我使用的是Vim和neocomplcache插件,它的使用提示和补全功能让我很困惑。
它的行为是这样的:当光标在os.path.的末尾时,我输入了<C-X><C-U>,然后不仅在一行下面列出了完成候选项,而且在顶部还出现了一个水平拆分,其中包含第一个候选项的文档字符串。我的问题是:如何摆脱这个功能,使我只得到代码完成,而没有使用提示?

发布于 2012-11-29 02:39:08
这都是因为默认情况下preview在completeopt中,您可以通过输入命令:set completeopt查看它的值,结果应该是completeopt=menu,preview。
我们需要的只是menu,所以去掉preview,在你的vimrc中添加下面这行:
set completeopt-=previewvim帮助参考:
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
global
{not available when compiled without the
|+insert_expand| feature}
{not in Vi}
A comma separated list of options for Insert mode completion
|ins-completion|. The supported values are:
menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
menuone Use the popup menu also when there is only one match.
Useful when there is additional information about the
match, e.g., what file it comes from.
longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more
characters. Whether case is ignored depends on the kind
of completion. For buffer text the 'ignorecase' option is
used.
preview Show extra information about the currently selected
completion in the preview window. Only works in
combination with "menu" or "menuone".https://stackoverflow.com/questions/13611198
复制相似问题