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

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

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


当前回答

ide基本上是:

编辑器/代码完成,重构和文档 调试器 文件系统资源管理器 scm的客户 构建工具

都在一个包里。

您可以使用单独的工具或出色的可编程编辑器和额外的工具,如Emacs(也可以使用Vim,但IDEbility IMO稍微少一些)来实现所有这些功能(以及更多功能)。

如果您发现自己经常在一个实用程序和下一个可以集成到环境中的实用程序之间切换,或者如果您缺少这里列出的一些功能(其他文章中有更完整的功能),那么可能是时候转移到IDE了(或者通过添加宏之类的方法来提高环境的ideability)。如果你已经用一个以上的程序构建了一个“IDE”(在我上面提到的意义上),那么就没有必要转移到一个真正的IDE。

其他回答

我喜欢IDE,因为它能在我的指尖提供很多功能。编辑/编译/项目中文件的可见性是我在IDE中所看重的一切。我现在使用Visual Studio,但在以前我使用slikedit,并发现它使我的开发过程比我不使用它时更流畅。

我认为这主要与开发者的认知范围有关。IDE提供了开发人员工作环境的宏观视图。您可以同时看到类层次结构、引用的资源、数据库模式、SDK帮助引用等。而且,由于您的击键会影响和影响如此多的事情,以及体系结构和体系结构交叉点的数量不断扩大,一次只使用一个代码岛工作变得越来越困难。

OTOH,“只有我和vim和手册页”让我对我的工作有了一个更精简的微观——但强烈而精确的——视图。如果我有一个用一种语言和一组静态库构建的设计良好、分区良好、稀疏耦合且高度内聚的代码库,那么这是可以的——这不是典型的情况,特别是当开发团队规模随着时间、距离和个人偏好而增长并重新构建代码结构时。

I'm currently working on projects in Flex and .NET. One of the nicer things about Flex is how few different ways there are to accomplish a standard thing - pull data from a database, open/close/read/write a file, etc. (Yet I'm using the Flex Builder/Eclipse IDE - a typical heavy-weight example like VS, because I'm still learning the basics and I need the training wheels. I expect to evolve back to vim once I'm confident of my patterns.) In this view, I can do what I need to do professionally by knowing a few things really really well.

OTOH, I can't imagine getting to that point with .NET because the view I'm expected to maintain keeps expanding and shifting. There much less conceptual integrity, and over several developers on a project over several months, much less consistency - but the IDE supports that, maybe encourages it. So the developer really needs to (and can more easily) know many more things adequately. Which also has the benefit of helping them answer (or even understand) a lot higher percentage of the questions on StackOverflow. I.e. we can have a deeper knowledge stack. And we can respond to a wider variety of help-wanted ads.

事情可能会朝着两个方向发展。也许对于“仅编辑器”作用域,这就像“如果你只有一把锤子,那么所有东西看起来都像钉子”。使用IDE方法,对于任何您想要固定在一起的东西,您都有广泛的紧固件和相关的工具范围可供选择- nals/锤子,螺钉/螺丝刀,螺栓/扳手,粘合剂/胶枪/夹子,磁铁等等-所有这些都在您的指尖(有向导帮助您开始)。

这取决于你使用的语言,但在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!

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

不要认为这是排他性的。使用IDE来获得它所提供的好处,当需要集中精力时切换到vim/首选的文本编辑器。

我发现IDE更适合重构、浏览、调试以及找出要做的事情。然后在IDE中完成小的事情,大的事情我切换到vim来完成。

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

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