Vim Supertab 插件在导航完成菜单时反转方向 [英] Vim Supertab plugin reverses the direction when navigating completion menu

查看:36
本文介绍了Vim Supertab 插件在导航完成菜单时反转方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过超级选项卡循环完成备选列表时(即通过按 激活),选择从列表的末尾开始,并在重复按 时向上循环.按 循环向下.

When I loop through the list of completion alternatives via supertab (i.e. activated by pressing <TAB>), the selection starts at the end of the list and cycles upwards when repeatedly pressing <TAB> or <C-n>. Pressing <S-TAB> or <C-p> cycles downwards.

相反的行为,我觉得更方便,当自动完成由 vim 内置 (?) 激活时发生,使用 <C-x><C-n>.然后向下循环,向上循环.

The opposite behaviour, which I find more convenient, happens when the automatic completion is activated by the vim built-in (?), using <C-x><C-n>. Then <C-n> cycles downwards and <C-p> upwards.

我对vim不太了解.我该如何解决这个问题?

I'm not too knowledgeable about vim. How can I fix this?

推荐答案

这是因为 SuperTab 的默认补全是 ,它向后循环(所以匹配 beforeem>,而不是在光标首先出现之后,这通常是您想要的).如文档所述,您可以通过以下方式更改:

This is because SuperTab's default completion is <C-p>, which cycles backwards (so matches before, not after the cursor are presented first, which is usually what you want). As documented, you can change that via:

let g:SuperTabDefaultCompletionType = "<c-n>"

(把它放到你的 ~/.vimrc 中.)

(Put this into your ~/.vimrc.)

这篇关于Vim Supertab 插件在导航完成菜单时反转方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆