在另一个问题中,Mark高度评价了ide,说“有些人仍然不知道”为什么“他们应该使用一个……”。作为一个使用vim进行编程的人,并且在大多数/所有同事都使用vim或emacs进行所有工作的环境中工作的人,ide的优势是什么?我为什么要用它?

我相信这对一些人来说是一个棘手的问题,我对开始一场论战不感兴趣,所以请只回复你认为基于ide的方法更好的原因。我对听到为什么我不应该使用IDE不感兴趣;我已经不用了。可以这么说,我感兴趣的是听取“栅栏的另一边”的意见。

如果您认为ide可能适合某些类型的工作,但不适合其他类型的工作,我也很想知道为什么。


当前回答

I'm not sure there's a clear dividing line between a text editor and an IDE. You have the likes of Notepad at one end of the scale, and the best modern IDEs at the other, but there are a lot of thing in between. Most text editors have syntax highlighting; editors aimed at programmers often have various other features such as easy code navigation and auto complete. Emacs even lets you integrate a debugger. The IDEs of even ten years ago had far less features to help programmers than you'd expect of a serious text editor these days.

其他回答

IDE可以让人更快更容易地工作……我注意到我花了很多时间在一个简单的文本编辑器中浏览代码……

在一个好的IDE中,如果IDE支持跳转到函数,跳转到之前的编辑位置,跳转到变量……此外,一个好的IDE可以减少试验不同语言特性和项目的时间,因为启动时间可以很短。

当“文本编辑器”实际上是emacs时,我认为做经典的“文本编辑器和控制台窗口vs IDE”是不公平的。IDE:s的大多数典型特性也在emacs中。或者它们甚至起源于那里,现代IDE主要是界面的改进/简化。

这意味着对于最初的问题,答案并不是那么明确。这取决于所讨论站点的用户如何使用emacs,是主要将其用作文本编辑器,还是完全使用自定义脚本,学习相关模式的命令,了解代码标记等等。

这取决于你使用的语言,但在c#和Java中,我发现ide对以下方面有好处:

Quickly navigating to a type without needing to worry about namespace, project etc Navigating to members by treating them as hyperlinks Autocompletion when you can't remember the names of all members by heart Automatic code generation Refactoring (massive one) Organise imports (automatically adding appropriate imports in Java, using directives in C#) Warning-as-you-type (i.e. some errors don't even require a compile cycle) Hovering over something to see the docs Keeping a view of files, errors/warnings/console/unit tests etc and source code all on the screen at the same time in a useful way Ease of running unit tests from the same window Integrated debugging Integrated source control Navigating to where a compile-time error or run-time exception occurred directly from the error details. Etc!

所有这些都节省时间。这些事情我可以手动完成,但会更痛苦:我宁愿编写代码。

节省开发时间 通过提供集成调试、智能感知等功能,使生活更轻松。

有很多,但我会建议使用一个,他们比明显。

除了其他答案之外,我喜欢使用类似于Eclipse的ViPlugin之类的东西,将IDE的开发能力与Vim的编辑能力结合起来。