Vi 编辑器中的代码完成

发布于 2024-08-09 14:50:19 字数 127 浏览 4 评论 0 原文

Vi 有自动完成功能吗? ctrlp 查找文档中已使用的关键字。但假设我希望 a.funcname 自动显示对象 a 的成员。用 Vi 可以吗?

Is there an autocomplete feature for Vi? ctrlp looks for keywords already used in the document. But suppose I want a.funcname to automatically show members of object a. Is it possible with Vi?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

挖鼻大婶 2024-08-16 14:50:19

YouCompleteMe。它是一个提供极快、完全语法感知的自动完成功能的插件。它还会动态显示代码错误(通过在违规行旁边的边距内放置标记)。

到目前为止,C++、C# 和 Python 都是原生支持的。不过,该插件有一个易于访问的 API,可以添加对更多语言的支持。

还有其他插件,但除了 Jedi (仅适用于 Python)之外,没有任何插件可以正常工作。

YouCompleteMe. It’s a plugin that offers extremely fast, fully syntax-aware auto-completion. It furthermore shows code errors on the fly (by putting a marker inside the margin next to the offending line).

So far, C++, C# and Python are natively supported. However, the plugin has an easily accessible API to add support for more languages.

There are other plugins but with the exception of Jedi (for Python only) nothing comes even close to working properly.

哽咽笑 2024-08-16 14:50:19

我意识到这并不能完全回答您的问题,但是您是否考虑过在 IDE 中运行 vi ?

viPluginEclipse 是一个非常好的 vi 模拟。由于它在 Eclipse 中运行,因此您可以获得 Eclipse 提供的所有代码完成功能。顺便说一句,Eclipse 不仅仅适用于 Java。它适用于多种语言,并且可以很好地满足您的需求。

当我不情愿地意识到 vi 本身并不能提供我开发时所需的帮助时,我就采取了这个方向,但我又不愿意放弃编辑器的力量。

I realise this isn't quite answering your question, but have you looked at running vi within an IDE ?

viPlugin works with Eclipse and is a pretty good vi emulation. Since it runs within Eclipse you get all the code completion that Eclipse provides. Eclipse isn't just for Java, btw. It works with a variety of languages and may well cater for what you need.

This is the direction I took when I reluctantly realised that vi by itself wasn't providing as much help as I needed when developing, but I was reluctant to give up the power of the editor.

dawn曙光 2024-08-16 14:50:19

我将 NetBeansjVi 插件。它为我提供了 vi 的编辑能力和 NetBeans 的智能自动完成功能。

I use NetBeans with the jVi plugin. It gives me the editing power of vi with the intelligent auto-completion features of NetBeans.

小瓶盖 2024-08-16 14:50:19

这取决于您的语言。例如,对于 C++,有 omnicppcomplete

It depends on your language. For c++, for example, there is omnicppcomplete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文