Eclipse CDT(用于 C++/C 开发)如何在键入时自动调用内容辅助

发布于 2024-10-29 19:21:03 字数 118 浏览 1 评论 0原文

Eclipse CDT(用于 C++/C 开发)如何在键入内容时自动调用内容辅助,就像在 Visual Studio 的 Visual Assist 中一样。换句话说,如何将触发器作为所有键盘字符来调用内容辅助。请帮我..

Eclipse CDT (for C++/C development) how to invoke content assist automatically while typing like in Visual Assist for Visual Studio. In other words how to give triggers as all keyboard characters to invoke content assist. Please help me..

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

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

发布评论

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

评论(4

凉月流沐 2024-11-05 19:21:05

您尝试过Ctrl+Space吗?还要在首选项中搜索“内容辅助”。

Have you tried Ctrl+Space? Also search for "Content Assist" in the preferences.

王权女流氓 2024-11-05 19:21:05

ctrl+空格键可以很好地工作。但是配置为自动完成就像 emacs 自动完成或 vim youcompleteme 一样,当输入单词时会调用提案,没办法。

ctrl+Space can work well. but configure as auto-complete just like emacs auto-complete or vim youcompleteme, when typing words will invoke proposal, no way.

岁吢 2024-11-05 19:21:04

似乎所有有用的内容辅助选项都默认关闭。转到首选项 -> C++->编辑->内容辅助 ->高级,并检查默认的基于解析的建议(顶部列表),然后在底部检查更多内容(如解析、单词、模板)。

当然,您可以自由地进行更多检查,但基于解析是最重要的。当然,您还需要启用索引,至少似乎是默认启用的。

当然,正如已经建议的那样,转到“内容辅助”窗格本身并确保其全部打开,并减少延迟以使其显示更快(除非您希望它仅在按 Ctrl+Space 时显示) 。

It seems that all the useful content assist options are turned off by default. Go to the preferences -> C++ -> Editor -> Content Assist -> Advanced, and check Parsing-based proposal for default (top list) and then some more (like parsing, word, template) in the bottom one.

Of course, you're free to check even more, but parsing-based is the one that matters the most. Of course, you also need to have indexing enabled, by at least that seems to be enabled by default.

And, of course, as already suggested, go to the Content Assist pane itself and make sure it's all turned on, and reduce the delay to make it show up faster (unless you want it to only show up when you press Ctrl+Space).

暖伴 2024-11-05 19:21:04

可悲的是——至少据我所知——内容辅助在那两年里没有改变。
仍然只有“.”、“->”触发和“::”并且无法配置它。
不过,Eclipse Java 编辑器可以按照 Nadith Pathirage 的意愿自由配置:您可以在其中添加任何您希望触发内容辅助的键。
我想知道为什么 CDT 不能实现相同的目标...

(我知道这是一个旧线程,但在我看来这个主题仍然很重要...)

The sad thing is that - at least to my knowledge - content assist didn't change in those 2 years.
It is still only triggered by ".", "->" and "::" and there is no way to configure it.
The Eclipse Java editor though can be freely configured as wished by Nadith Pathirage: You can add any keys you wish to trigger content assist there.
I wonder why CDT can't achieve the same...

(I know this is an old thread, but the topic is still important in my opinion...)

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