C++ Eclipse CDT 自动完成不工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11399719/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 15:06:58  来源:igfitidea点击:

Eclipse CDT Autocomplete not working

c++eclipseeclipse-cdt

提问by Délisson Junio

I remember from some time ago that Eclipse had auto-complete when you type, and now I can only get it when pressing Ctrl+ Space. I already checked and don't have any unresolved dependencies, I can see all the auto-complete choices when pressing Ctrl+ Space, but that's not something I like to do every-time... Can someone point me in the direction to get auto-complete back? (Using CDT C++)

我记得前段时间 Eclipse 在你输入时有自动完成功能,现在我只能在按Ctrl+时才能得到它Space。我已经检查过并且没有任何未解决的依赖项,我可以在按Ctrl+时看到所有自动完成选项Space,但这不是我每次都喜欢做的事情......有人可以指出我的方向以获得自动-完整回来?(使用 CDT C++)

回答by IsaacS

At some point recently (not sure but since March 2013?) my Eclipse CDTstopped auto completion. I figured out that at Editor->Content Assist->Advancedchecking Parsing-based Proposalslets auto completion work on my machine.

最近的某个时候(不确定,但自 2013 年 3 月以来?)我的 EclipseCDT停止了自动完成。我发现在Editor-> Content Assist->Advanced检查Parsing-based Proposals让自动完成在我的机器上工作。

Ubuntu 12.10, Eclipse 4.2.2, CDT 8.1.2

Ubuntu 12.10、Eclipse 4.2.2、CDT 8.1.2

enter image description here

在此处输入图片说明

This snapshot shows Task-Focused, which I don't see on my another Eclipseinstance. In that case I just checked Parsing-based Proposalsand completion still works.

此快照显示Task-Focused,我在另一个Eclipse实例上没有看到。在那种情况下,我刚刚检查过Parsing-based Proposals并且完成仍然有效。

回答by Amit Kr

This question is so valid even in 2018 with eclipse photon.

即使在 2018 年有日食光子,这个问题也是如此有效。

1) Go to Window > Prefrences > C/C++ > Editor > Content Assist > Advanced.

1) 转到窗口 > 偏好 > C/C++ > 编辑器 > 内容辅助 > 高级。

2) Check "Parsing-based proposal(Task-focused)".

2) 勾选“基于解析的提议(Task-focused)”。

3) Bind a key now by pressing "Ctrl + Space".

3) 现在按“Ctrl + Space”绑定一个键。

enter image description here

在此处输入图片说明

回答by kierans

I had a problem with Eclipse Juno (OSX Java "1.6.0_33") where the autocomplete (and save key binding) wasn't working properly. Googling I found this: Eclipse JUNO doesn't start

我在使用 Eclipse Juno(OSX Java“1.6.0_33”)时遇到问题,其中自动完成(和保存键绑定)无法正常工作。谷歌搜索我发现这个:Eclipse JUNO 没有启动

Updating my Mercurial Plugin to the latest (1.9.1) fixed both these issues for me.

将我的 Mercurial 插件更新到最新版本 (1.9.1) 为我解决了这两个问题。

Very weird.

很奇怪。