Live data from Hacker News

Switching from Vim to Intellij

browntreelabs.com

251–260 of 263 posts

Re: Switching from Vim to Intellij

#251
post #173

>Everything is pre-configured: You don’t have to worry about setting up tags, or YouCompleteMe, or NERDTree. I can’t tell you how many times I open a new project, perhaps in a different language, and everything works great out of the box. It’s a total sigh of relief. I agree 100% here, if you value these types of IDE tools I don't recommend going to Vim. It frankly sucks at this stuff, it wasn't meant for it and it's…

> 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 imp…

> 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

#252

Earlier quoted context omitted.

> 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 imp…

> 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 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

#253
post #207
post #173

>Everything is pre-configured: You don’t have to worry about setting up tags, or YouCompleteMe, or NERDTree. I can’t tell you how many times I open a new project, perhaps in a different language, and everything works great out of the box. It’s a total sigh of relief. I agree 100% here, if you value these types of IDE tools I don't recommend going to Vim. It frankly sucks at this stuff, it wasn't meant for it and it's…

The killer thing for me is how IntelliJ has the best cross-language embed support. So it not only knows when strings in my python code are sql queries, but it autocompletes in those strings against my actual schema

And I recently learned that it will open the embedded language in its own editor pane (ala editing code in org mode, if that means anything) and can be a less distracting way to edit without the mental encode/decode cycle

It may have been implied by the "it autocompletes" statement, but it runs analysis on that code, too, catching bad practices such as logic errors, common mistakes, and unused code (where applicable)

One can influence its embedded language detection via `language=RegExp` (or whatever the language id is) while inside a comment right above the embedded language literal: https://github.com/JetBrains/intellij-community/blob/idea/20...

Re: Switching from Vim to Intellij

#254
post #235
post #136

Earlier quoted context omitted.

How often do people rename identifiers for that to be a particularly useful feature? If it's not that often, you might be served fine with something like sed -i 's/foo/bar/g' **.rb It's not precise, so it might take some manual work and tweaking with the patterns, but for how often I've had to rename identifiers, it works good enough to handle the bulk work. A bit of forethought when first naming things works wonders…

That only works if the identifier name is unique across your files. What if you have a field on class "Zoo" named "containers" and you want to replace it with "animal_containers", but only for the "Zoo" class? There are probably other usages of "containers" in the code, with no easy way for something like sed to distinguish between "zoo_instance.containers" and "car_instance.containers". You need an editor that can u…

> That only works if the identifier name is unique across your files

hence

> It's not precise, so it might take some manual work and tweaking with the patterns

and like I said,

> for how often I've had to rename identifiers, it works good enough to handle the bulk work.

so

> You need an editor that can understand

No I don't, because renaming across many files is rare enough that I don't need it.

Most of the time, I do refactoring before it's gotten out of hand and so regular vim features like I mentioned in another comment are typically enough.

In other words, I think such understanding by the editor is too much complexity (and language-constrained, at that) for little reward.

Re: Switching from Vim to Intellij

#255
post #233
post #136

Earlier quoted context omitted.

How often do people rename identifiers for that to be a particularly useful feature? If it's not that often, you might be served fine with something like sed -i 's/foo/bar/g' **.rb It's not precise, so it might take some manual work and tweaking with the patterns, but for how often I've had to rename identifiers, it works good enough to handle the bulk work. A bit of forethought when first naming things works wonders…

Refactoring is an essential part of software development. sed is not gonna cut it. The same way that inserting a newline character every 80 or so characters cannot be called source code formatting

Refactoring doesn't consist only of renaming identifiers, and for the portion that it does, regular vim features like `/`, `c`, `n`, and `.` or macros or such are often enough.

Re: Switching from Vim to Intellij

#256

Earlier quoted context omitted.

It might be worth taking a look at Onivim2 ( https://onivim.io )

Yeah, I've been following that one for a while, I pre-ordered it. I was a little disappointed they switched from neovim back to vim. I'm sure the engineering reasons were sound, although I didn't understand them and it made me a little less excited about the project. Not sure how to feel about the goal of vscode plugin compatibility. I'd hope for a vim based ide to kind of "be its own thing".

Why do you prefer neovim to vim? I tried both and as of vim8 there wasn't anything keeping me on neovim so I switched back. I figured any neovim features would be handled by the IDE side

Re: Switching from Vim to Intellij

#257

Earlier quoted context omitted.

> 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 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 greate…

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

#258

Earlier quoted context omitted.

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 greate…

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…

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.

Re: Switching from Vim to Intellij

#259

Intellij just seems so incredibly bloated and slow to me. I still think older Visual Studio versions (not vscode) as the high water mark for any IDE I've ever used. I remember lots of talk how intellisense might be harmful http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind...

IntelliJ feels like coding underwater. The only reason I ever use it when I have to or when I get tired of typing page after page of awful verbose Java APIs.

Re: Switching from Vim to Intellij

#260

Earlier quoted context omitted.

Yeah, I've been following that one for a while, I pre-ordered it. I was a little disappointed they switched from neovim back to vim. I'm sure the engineering reasons were sound, although I didn't understand them and it made me a little less excited about the project. Not sure how to feel about the goal of vscode plugin compatibility. I'd hope for a vim based ide to kind of "be its own thing".

Why do you prefer neovim to vim? I tried both and as of vim8 there wasn't anything keeping me on neovim so I switched back. I figured any neovim features would be handled by the IDE side

- Built in LSP support

- Moving away from config and plugins in VimL, which is extremely idiosyncratic and awkward to use, towards lua and other languages via rpc

- Long term health of the project - neovim feels like a truly community driven project, whereas Vim seems bottlenecked by Bram and his specific desires. Neovim has also gone to great lengths to make the source easy to maintain long term.

- inccommand (https://neovim.io/doc/user/options.html#'inccommand')

- saner defaults

Post reply on HN