首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Vim neocomplcache:禁用使用提示

Vim neocomplcache:禁用使用提示
EN

Stack Overflow用户
提问于 2012-11-29 01:42:24
回答 1查看 1.2K关注 0票数 2

我使用的是Vim和neocomplcache插件,它的使用提示和补全功能让我很困惑。

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-11-29 02:39:08

这都是因为默认情况下previewcompleteopt中,您可以通过输入命令:set completeopt查看它的值,结果应该是completeopt=menu,preview

我们需要的只是menu,所以去掉preview,在你的vimrc中添加下面这行:

代码语言:javascript
复制
set completeopt-=preview

vim帮助参考:

代码语言:javascript
复制
                        *'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".
票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13611198

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档