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

> On large projects its still cheaper and faster to grep from the CLI than to use Intellij IDE search. Esp if you wish to restrict search to subsets of dirs.

You must never have used Intellij to say that... it hurts me to hear this. If I catch a developer "grepping" for some type in the CLI, I will sit down with them for a few hours explaining how to use an IDE and how grep is just dumb text search without any of the semantic understanding of the code that an IDE has, and they should never do that again.

EDIT: IntelliJ is better than grep even at "free text" search... Much better as it will show you the results as you type, extremely fast, and lets you preview them and see their "surrounding code"... and you can then choose to navigate to a place instantly... and yes, you can scope the search to a particular directory if you want... if you can't see how this is miles superior to CLI grep, then there's no use arguing as you've made up your mind you just love being in the CLI for no actual rational reason.



Umm..I _am_ talking about the free text search. Miles superior is NOT miles faster when you want speed. You need not change tabs, fiddle laboriously with the finicky scope drop-down and create custom scopes. Instead you execute an ripgrep command with filter directories (or load alias/from history), pipe to neovim and get auto-preview of results, including surrounding preview code. You don't have to load a huge project and wait for looong code-indexing.

if you can't see how this is miles superior to IDE grep (esp when exploring a number of large projects), then there's no use arguing as you've made up your mind you just love being in the IDE for no actual rational reason.


> Instead you execute an ripgrep command with filter directories (or load alias/from history), pipe to neovim

Talk about moving the goal posts.


> Talk about moving the goal posts.

Hey, you are the one who moved the goal posts fist by bringing up use-cases like surrounding preview. You can use ripgrep -> fzf -> bat in one single command if you want to stick to the CLI for fast search previews. But I personally like neovim's comfort better and it is extremely fast to load compared to Intellij. (Not to mention, you can keep feeding the quickfix list more search results from other places)


He said cheaper and faster. It takes 5-10 minutes for IntelliJ to start up properly for me, and doing anything in it is just too slow. (rip)grep is way faster.

Yes yes, I need a better PC. (rip)grep would still be faster, however, but I would use the IDE.


It sounds totally broken. IntelliJ starts in a few seconds for me. 10 minutes is crazy, maybe your system has no free RAM at all when you try that.


I have 8 GB only, so yeah, no RAM when I have a browser open. And by startup I am referring to background indexing, project initialization, etc. on a large enough codebase.


Normally, the IDE is open at all times when you're coding. But if you don't code all the time, I can see how you may prefer to avoid IntelliJ and I would also do that if I was just searching for strings.


IntelliJ is unfortunately very sluggish for me either way, and as of now, if it is open, I cannot do anything else on the PC, which means it is only open when I am actively coding, but even then, it is just so slow that I would rather not.

On the other hand, VSCodium and vim / emacs are always open, at the same time. But I do not like coding in Java / Kotlin without IntelliJ, which I do for some work.

Honestly, a better PC would solve this issue.


I completely understand. But I suppose most developers, specially in the USA (where salaries are astronomicals) and even Europe (where I am, most top-of-the-line laptops are affordable to most devs here) it's not a problem, but I too have a low-end Mac (which would be an expensive machine in some countries!) where IntelliJ doesn't run so well, as you mention. In those cases, I use emacs which has similar "grep" functionality. What I was arguing against was just doing it "only" in the CLI. You will spend hours for something that should be minutes!! But even the guy who originally said he does it on the CLI admited he's actually just calling it from the CLI, but using an IDE (if you allow me to call Neovim an IDE) to go through the results... which is basically the poor man way to do what IntelliJ does (no offence meant).


Thanks!

FWIW in VSCodium, I have one or more terminals open, and sometimes I would (rip)grep. Not always, but sometimes, when I see there is use for it. I am used to the quick output of the tool and sometimes that is all I need.




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

Search: