Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I programmed exclusively with text editors for a number of years. Of course you can do anything in a text editor that you can do in a modern IDE as long as you have patience. I would even go so far as to say that having the experience of using a text editor instead of an IDE is a valuable one; certain types of edits really can be done much more efficiently in vim than an IDE so it's an excellent tool to have at your disposal. But text editors simply can't match the sophistication and efficiency of a good IDE that is built to interact with your code programmatically from the ground up. For example, here is a list of refactoring operations that IDEA provides as atomic operations that can be done in a few clicks/keystrokes and instantly, safely undone with a single keystroke[0]:

* Change signature

* Convert Anonymous to Inner

* Convert to Instance Method

* Encapsulate Fields

* Extract refactorings

  * Extract constant

  * Extract Field

  * Extract interface

  * Extract method

  * Extract Superclass

  * Extract variable

  * Extract parameter

  * Extract into class refactorings
* Find and Replace Code Duplicates

* Generify Refactoring

* Inline

* Invert Boolean

* Make Static

* Migrate

* Move and Copy refactorings

* Pull Members Up, Push Members Down

* Remove Middleman

* Rename refactorings

* Replace Constructor with Builder

* Replace Constructor with Factory Method

* Replace Inheritance with Delegation

* Replace Temp With Query

* Safe delete

* Type Migration

* Use Interface Where Possible

* Wrap Return Value

Meanwhile, merely performing a simple pure-text find-replace across multiple files using vim and emacs is a chore. And better hope you don't screw it up because there's often no easy way to safely undo such a change, especially not with a single keystroke. The idea that even master-level users of vim/emacs could begin to hope to replicate the operations listed above with the depth, accuracy, and user-friendliness that IDEA offers is simply laughable. Any granddad worth his salt is perfectly capable of understanding that advancements in software have yielded tools that are by far and away objectively superior for a wide variety of development tasks.

[0] https://www.jetbrains.com/help/idea/refactoring-source-code....



> Meanwhile, merely performing a simple pure-text find-replace across multiple files using vim and emacs is a chore.

It is not, i do that fine in emacs. Half of your list can be done with regex replace. Things like extract and refactor needs language specific tooling that can be done with text editor too(see LSP). And some stuff on your list doesn't even apply to other languages that they have community support for e.g. Rust.

But sure Jetbrains has put lot of effort on these tools for a few languages that you can certainly benefit for a large project. Outside of that good luck using it for any other language.


Good luck with regex replace for most of these operations. Seriously, you're gonna need a lot of it to do these things correctly and consistently, if you can even do them at all. And even then it will be about 10-100+x the time and mental overhead that it could be with an IDE.


I don't see how they could be done with regexes. It seems to me that most of them require class hierarchy analysis so that you don't touch the wrong method that just happens to have the same name.


Yeah, exactly. Every time I try doing these things with regex there winds up being some edge case where something that should have been picked up isn't or vice versa. Then there are ambiguous cases of references in comments and non-code files for which IDEA provides a very straightforward UI experience to include or exclude by various categories or on a case-by-case basis.

Even in the best case scenario where regex works, you've still spent unnecessary mental overhead writing regex, a tool that is so difficult to use properly that it is the textbook example of being a 'solution' that causes more problems than it solves. Why subject oneself to such unnecessary hassle?


That's cool, if you plan to work on the same technology forever. I think why vim/emacs users have over IDE users is that when you change technology or company or team, you can just change some things about your config and keep working. Try replacing a cool IDE for assembly with a cool IDE for PHP and then a cool IDE for Clojure.


In terms of undoing, I use git and I could undo it with just a few keystrokes. As for the refactoring, yeah, you're right, that stuff would be difficult. I'll keep it in mind if I ever do need to do that stuff. It hasn't happened yet, though.


Lol, k. Good luck.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: