Hacker News new | ask | show | jobs
by xfer 2625 days ago
> 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.

2 comments

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?