Vim:让自动完成更智能 [英] Vim: Making Auto-Completion Smarter
问题描述
我使用 ctags、taglist 等在 Vim 中自动完成.但是,与 Visual Studio 智能感知或 Eclipse 自动完成相比,它非常有限.我想知道是否可以将 Vim 调整为:
I use ctags, taglist, etc., to have auto completion in Vim. However, it is very limited compared to Visual Studio intellisense or Eclipse auto-completion. I am wondering whether it is possible to tune Vim to:
每当 .或 -> 被输入.但仅在某些可能是变量的文本之后(例如,避免在数字之后显示自动完成).
Show auto-completion whenever . or -> are typed. But only after some text that might be a variable (e.g. avoid showing auto completion after a number).
在输入 ( 时显示函数参数.
Show function parameters when ( is typed.
当某些人删除 . 之后的所有字符时,停止删除自动完成列表.或 ->:当我输入变量名时,然后按 .或 -> 要搜索某个成员,我经常不得不删除 . 之后键入的所有字符.或 ->,但这会使 Vim 隐藏自动完成列表.我想让它保持可见,除非我按 Esc.
Stop removing the auto completion list when some delete all characters after . or ->: When I enter a variable name, then press . or -> to search for a certain member, I frequently have to delete all the characters I type after the . or ->, but this makes Vim hide the auto completion list. I would like to keep it visible unless I press Esc.
显示相关的自动完成:当我输入一个变量并按 ^X ^O 时,它通常会显示 ctags 文件中的所有标签.我想让它只显示与变量相关的标签.
Showing related auto completion: When I type a variable and press ^X ^O, it usually shows me all the tags in the ctags file. I would like to have it showing only the tags related to the variable.
感谢您的帮助.
编辑:有些人为这个问题投票,但似乎没有人知道答案.所以只想提一下,您不必提供完整的答案;对上述任何一点的部分答案也很好.
EDIT: Some people are voting for this question, but no body seems to know the answer. So just wanted to mention that you don't have to provide a complete answer; partial answers to any of the mentioned points would be good also.
推荐答案
AutoComplPop 正是您所需要的.
这篇关于Vim:让自动完成更智能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!