如何在 Visual Studio C++ 快速版中启用自动完成功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3253289/
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
How do you enable auto-complete functionality in Visual Studio C++ express edition?
提问by Asad
Please guide me, how do you enable autocomplete functionality in VS C++? By auto-complete, I mean, when I put a dot after control name, the editor should display a dropdown menu to select from.
请指导我,你如何在 VS C++ 中启用自动完成功能?通过自动完成,我的意思是,当我在控件名称后面放一个点时,编辑器应该显示一个下拉菜单以供选择。
Thank you.
谢谢你。
回答by nisse
Start writing, then just press CTRL+SPACE and there you go ...
开始写作,然后只需按 CTRL+SPACE 就可以了...
回答by Praveen Fernando
回答by thebunnyrules
All the answers were missing Ctrl-J (which enables and disables autocomplete).
所有答案都缺少 Ctrl-J(启用和禁用自动完成)。
回答by ved prakash
- Goto => Tools >> Options >> Text Editor >> C/C++ >> Advanced >> IntelliSense
- Change => Member List Commit Aggressive to True
- 转到 => 工具 >> 选项 >> 文本编辑器 >> C/C++ >> 高级 >> IntelliSense
- Change => Member List Commit Aggressive to True
回答by Tony
Include the class that you are using Within your text file, then intelliSense will know where to look when you type within your text file. This works for me.
在文本文件中包含您正在使用的类,然后当您在文本文件中键入时,intelliSense 将知道在哪里查看。这对我有用。
So it's important to check the Unreal API to see where the included class is so that you have the path to type on the include line. Hope that makes sense.
因此,检查 Unreal API 以查看包含类的位置非常重要,这样您就可以在包含行中输入路径。希望这是有道理的。
回答by DumbCoder
Have you tried Visual Assist X ? Sort of lights up the VS editor.
你试过 Visual Assist X 吗?有点点亮 VS 编辑器。
回答by Christian
It's enabled by default. Probably you just tried on an expression that failed to autocomplete.
它默认启用。可能您只是尝试了一个无法自动完成的表达式。
In case you deactivated it somehow... you can enable it in the Visual Studio settings. Just browse to the Editor settings, then to the subgroup C/C++ and activate it again... should read something like "List members automatically" or "Auto list members" (sorry, I have the german Visual Studio).
如果您以某种方式停用它……您可以在 Visual Studio 设置中启用它。只需浏览到编辑器设置,然后到子组 C/C++ 并再次激活它...应该阅读类似“自动列出成员”或“自动列出成员”(对不起,我有德国 Visual Studio)。
Upon typing something like std::cout. a dropwdownlist with possible completitions should pop up.
键入 std::cout 之类的内容时。应该会弹出一个包含可能完成的下拉列表。
回答by cHao
VS is kinda funny about C++ and IntelliSense. There are times it won't notice that it's supposed to be popping up something. This is due in no small part to the complexity of the language, and all the compiling (or at least parsing) that'd need to go on in order to make it better.
VS 关于 C++ 和 IntelliSense 有点有趣。有时它不会注意到它应该弹出一些东西。这在很大程度上是由于语言的复杂性,以及为了使它更好而需要进行的所有编译(或至少是解析)。
If it doesn't work for you at all, and it used to, and you've checked the VS options, maybe this can help.
如果它根本不适合你,它曾经是,并且你已经检查了 VS 选项,也许这可以帮助。
回答by yanger
I came across over the following post: http://blogs.msdn.com/b/raulperez/archive/2010/03/19/c-intellisense-options.aspx
我遇到了以下帖子:http: //blogs.msdn.com/b/raulperez/archive/2010/03/19/c-intellisense-options.aspx
The issue is that the "IntelliSense" option in c++ is disabled. This link explains about the IntelliSense database configuration and options.
问题是 C++ 中的“IntelliSense”选项被禁用。此链接解释了 IntelliSense 数据库配置和选项。
After enabling the database you must close and reopen visual studio for autocomplete use 'ctrl'+'space'
启用数据库后,您必须关闭并重新打开 Visual Studio 以自动完成使用 'ctrl'+'space'
回答by PoChien Wang
'ctrl'+'space' will open C/C++ autocomplete.
'ctrl'+'space' 将打开 C/C++ 自动完成。