gpt4 book ai didi

python - Vim neocomplcache : disable usage prompt

转载 作者:行者123 更新时间:2023-11-28 19:57:38 25 4
gpt4 key购买 nike

我正在使用带有 neocomplcache 插件的 Vim,它的使用提示完成时的功能让我很困惑。

它的行为是这样的:我输入了 <C-X><C-U>当光标位于 os.path. 的末尾时,那么不仅在线下列出了完成候选人,而且还进行了水平拆分其中包含第一个候选人的文档字符串出现在顶部。我的问题是:如何取消此功能,以便我仅在没有使用提示的情况下完成代码?

enter image description here

最佳答案

都是因为preview默认在completeopt中,可以按类型看它的值命令 :set completeopt 结果应该是 completeopt=menu,preview

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

set completeopt-=preview

vim 帮助引用:

                        *'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".

关于python - Vim neocomplcache : disable usage prompt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13611198/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com