News for hackers. Stuff that matters.
Re:Switching from Vim to Intellij by tsimionescu on Friday November 06, 2020 @02:01AM (#25005603)
> But on the other hand, please consider the Zen of dumb tools: I code all day in Vim and I don't use YouCompleteMe, NERDTree or anything like that. I use dumb, language-agnostic completion and dumb, language-agnostic FZF and Rg for searching and navigating the source code. If I'm feeling fancy I use universal-ctags, but if it's not here FZF and Rg do a good enough job.

I understand this preference, but it's also important to recognize that you are essentially programming with one hand tied behind your back when you are choosing to use such tools instead of an IDE when one is available.

For example, free IntelliJ can do "Data flow from/to here" analysis on your code for Java (probably others as well), which analyzes your whole project and finds all the code paths that use/provide a value for a variable, at any depth of calls. For a medium-sized product, finding the same information with Rg is easily 30m of work; if you need to navigate between the levels to find a bug, you'll lose even more time.

Also, refactoring tools that an IDE can give you make certain programming tasks trivial at 3-5 key presses which would easily be a 2 day change in a medium project using basic text processing tools.

Especially now that most IDEs also support VIM or emacs key bindings, it is very rarely a good idea for medium-to-large codebases to rely on text processing tools instead of a full IDE. Note that I'm also considering vim/emacs+language server or similar extensions as an IDE (though LSP has quite a way to go, especially on the refactoring side).

For small projects, or for languages with poor code analysis support, I do agree that these advantages don't amount to much and personal preference and familiarity amounts to much more than any tools an IDE can give.

Re:Switching from Vim to Intellij by theonemind on Friday November 06, 2020 @02:27AM (#25005745)
I land in the "if you need an IDE, you already took a wrong turn" school of thought, basically Paul Graham's position in this old post: https://news.ycombinator.com/item?id=72710

granted, we don't always get to choose what language we use or what code bases we inherit.

Re:Switching from Vim to Intellij by tsimionescu on Friday November 06, 2020 @02:42AM (#25005824)
That's a very strange attitude from someone who proselytizes Lisp, the language which pioneered IDEs about 30 years before other languages really had anything comparable.

Emacs, for Common Lisp, is still a much more advanced IDE than many languages have. It used to actually be a significant ingredient in the secret sauce that made Lisp so powerful - an advantage which it has thoroughly lost to IntelliJ/Visual Studio in my opinion.

Re:Switching from Vim to Intellij by nemoniac on Friday November 06, 2020 @04:12AM (#25006233)
There's a school of thought that Slime in Emacs is such a different beast from what is generally considered to be an IDE that it doesn't belong in that category. My guess is that pg belongs to that school.
Re:Switching from Vim to Intellij by pjmlp on Friday November 06, 2020 @04:22AM (#25006279)
I guess that is because Emacs is just a fraction of what Common Lisp environments are capable of, so what gets happy with what they can get (as free beer).
Re:Switching from Vim to Intellij by freedomben on Friday November 06, 2020 @09:53AM (#25007962)
> it's also important to recognize that you are essentially programming with one hand tied behind your back

I understand what you're saying but as someone who went the other way (from IDEs to Vim exclusively) I disagree (except for Java, for Java an IDE is mandatory as a result of the way the ecosystem/culture has developed in an IDE centric way).

There are benefits to lack of features. It's a tradeoff of course, but I find that the super simple language agnostic Ctrl+N autocomplete gets me 85% of the way there, and it's so predictable to me that I don't usually need to even look at the menu. I fly through it. With IDEs I find myself having to think about it more closely, and look at subtext for context. That's just one example.

So while I don't disagree with you necessarily, I think IDEs also (metaphorically) require tying some part of your hand behind your back. They are just different parts.

Re:Switching from Vim to Intellij by tsimionescu on Friday November 06, 2020 @10:02AM (#25008037)
I don't disagree with you. However, I think your example is not great and it's pretty representative of what I've seen many people who prefer vim use.

To me, writing code is a relatively minor part of software development, so auto-complete and such are nice to have features, but not crucial. Dumb auto-complete is absolutely good enough, even for Java.

Reading code, especially navigation and analysis, is a much greater part of the day to day experience that I for one have, and here grep is so inferior to code analysis tools that I really don't understand how people can use it.

Note that I am currently an Emacs user (company won't pay for GoLand), but the extra value added by lsp-mode is maybe a quarter of my productivity.

Re:Switching from Vim to Intellij by freedomben on Friday November 06, 2020 @04:33PM (#25011404)
You make a great point: I wasn't considering code navigation. I did indeed get a ton of value from that back in the day.

For most of what I do the symbol is defined/used in the same file, so a simple `*` (Shift + 8) will get what I need it, but when it doesn't then I'm relegated to grep (I actually use a tool I wrote myself called findref[1]). It gets me 70 to 80 percent of the way there, but that's it.

To me that's "good enough" that when combined with the other benefits of plain vim over an IDE (especially ability to work over SSH like it's local, which I do a lot), it's worth it to me.

[1]: https://github.com/FreedomBen/findref

Re:Switching from Vim to Intellij by tsimionescu on Friday November 06, 2020 @07:35PM (#25012403)
Sure, I completely agree that you get 70-80% of the way there with very simple tools, and there is value in that.

Just one note about SSH: Emacs and VSCode have a nifty way of doing the opposite of how you use vim over SSH: I can run Emacs on my own system and edit remote files directly and even run remote commands. This has the nice advantage that I get to use my own customized Emacs but still edit files on all sorts of remote systems, including stuff like kubernetes-mode or other niceties.