我想把我的编程视野扩展到Linux。一个好的、可靠的基本工具集很重要,还有什么比IDE更基本呢?

我可以找到这些SO主题:

轻量级IDE linux和 你使用什么工具来开发 Linux上的c++应用程序?

我并不是在寻找轻量级IDE。如果一个IDE值那么多钱,我就会为它付费,所以它不一定是免费的。

我的问题是:

Linux有什么好的c++编程IDE ?

最小值是相当标准的:语法高亮显示、代码完成(如智能感知或其Eclipse对应版本)和集成调试(例如basic 断点)。

我自己也搜索过,但是有太多了,几乎不可能手工区分好的和坏的,特别是对于像我这样在Linux中几乎没有c++编程经验的人来说。我知道Eclipse支持c++,而且我真的很喜欢Java的IDE,但是它对c++有什么好处吗?还有更好的吗?

第二篇文章实际上有一些很好的建议,但我遗漏的是,究竟是什么让建议的IDE对用户这么好,它的(缺点)优势是什么?

也许我的问题应该是:

根据您的经验,您建议使用哪种IDE,为什么?


当前回答

在Visual Studio环境下长大,我发现相对年轻的Code::Blocks非常熟悉。

其他回答

Konrad的建议非常棒,在经典的vi/cc/ld/db/make环境中,你应该可以轻松高效地工作。很多很多大学生在10-15周的课程中学习了这个工具链。

也就是说,另一个经典环境是走Emacs路线。我不会将其称为IDE,但它确实将两个重要的开发工具集成到编辑器中:编译器的输出和调试器。您可以让它压缩到文件中与编译器错误对应的行,您可以设置断点并从编辑器中使用步进。

我不想重复答案,但我想我可以再补充一点。

Slickedit是一个优秀的IDE。

It supports large code-bases well without slowing down or spending all its time indexing. (This is a problem I had with eclipse's cdt). Slickedit's speed is probably the nicest thing about it, actually. The code completion works well and there are a large amount of options for things like automatic formatting, beautification and refactoring. It does have integrated debugging. It has plug-in support and fairly active community creating them. In theory, you should be able to integrate well with people doing the traditional makefile stuff, as it allows you to create a project directly from one, but that didn't work as smoothly as I would have liked when I tried it. In addition to Linux, there are Mac and Windows versions of it, should you need them.

我非常喜欢Ultimate++的IDE。它有一些被设计为与自己的库一起使用的特性(顺便说一下,如果你不想在GTK+或QT上购买,这是一个相当不错的工具包),但它与一般的c++项目一起工作得非常好。它提供了良好的代码补全、良好的语法着色、集成调试以及大多数现代ide支持的所有其他特性。

如果你长期使用vim,那么你应该把它作为你的IDE。有很多插件可用。我发现其中一些非常有用,并在这里编译,看看它。

C / c++ IDE 源代码浏览器

还有更多的vi / vim技巧系列。

你能再解释一下你的情况吗,你需要改变什么。也许你可以通过提供一些你使用的信息的链接给我指明正确的方向。

我的第一个来源实际上是工具的手册页。只要输入

$ man toolname

在命令行上($ here是提示符的一部分,而不是输入)。

Depending on the platform, they're quite well-written and can also be found on the internet. In the case of make, I actually read the complete documentation which took a few hours. Actually, I don't think this is necessary or helpful in most cases but I had a few special requirements in my first assignments under Linux that required a sophisticated makefile. After writing the makefile I gave it to an experienced colleague who did some minor tweaks and corrections. After that, I pretty much knew make.

我使用GVIM是因为我在这方面有一些(但不是很多)经验,关于Emacs或替代方案我不能说什么。我发现阅读别人的.gvimrc配置文件真的很有帮助。很多人把它放在网上。这是我的。

不要试图一次掌握所有的双utils,有太多的函数。但是要有一个大概的了解,这样你就知道将来需要什么东西的时候去哪里找了。但是,您应该知道g++和ld (GCC链接器工具,自动调用,除非显式阻止)的所有重要参数。

另外,我很好奇,编码时有代码完成和语法高亮吗?

语法高亮:是的,而且比Visual Studio好得多。代码完成:差不多。首先,我必须承认,我甚至在Visual Studio中都没有使用c++代码补全,因为(与VB和c#相比)它不够好。我现在不经常使用它,但是尽管如此,GVIM对c++有本地代码补全支持。结合ctags库和像taglist这样的插件,这几乎就是一个IDE。

实际上,是阿明·罗纳切的一篇文章激发了我的灵感。在阅读文章之前,看看文章末尾的截图!

在得到(语法)错误之前必须先编译吗?

是的。但这对于Visual Studio来说是一样的,不是吗(我从来没有用过Whole Tomato)?当然,语法高亮显示不匹配的括号,但仅此而已。

如何调试(再次考虑断点等)?

我使用gdb,这是一个命令行工具。还有一个叫做DDD的图形前端。gdb是一种现代的调试工具,可以做您在IDE中可以做的所有事情。唯一真正让我恼火的是读取堆栈跟踪,因为行没有缩进或格式化,所以当你使用很多模板时(我就是这样做的),很难扫描信息。但这些也会使ide中的堆栈跟踪变得混乱。

就像我说的,我很“荣幸”在高中时使用windows记事本和命令行Java编译器迈出了我在Java编程语言中的第一步,它是…嗯,噩梦!当然,当我把它和我当时学的其他编程课程进行比较时,我们有不错的IDE

您甚至不应该尝试将现代的全功能编辑器(如Emacs或GVIM)与Notepad进行比较。记事本是一个修饰的文本框控件,这真的使所有的不同。此外,在Linux和Windows中使用命令行是一种非常不同的体验。Windows cmd.exe严重损坏。PowerShell要好得多。

/EDIT: I should mention explicitly that GVIM has tabbed editing (as in tabbed browsing, not tabs-vs-spaces)! It took me ages to find them although they're not hidden at all. Just type :tabe instead of plain :e when opening a file or creating a new one, and GVIM will create a new tab. Switching between tabs can be done using the cursor or several different shortcuts (depending on the platform). The key gt (type g, then t in command mode) should work everywhere, and jumps to the next tab, or tab no. n if a number was given. Type :help gt to get more help.