Hacker News new | ask | show | jobs
by simias 2017 days ago
IMO if you want an IDE use an IDE. There are a wealth of plugins that attempt more or less successfully to bring IDE-like features to VIM, but I'm not sure I see the point personally, it'll never be as seamless as an IDE built and maintained from the ground up to do these things. I hear that many IDEs have semi-competent Vim-style editing support, so maybe that would be more to your taste.

If you want to try the Vim experience I suggest doing it the Vim way, use a minimal config when starting, only add plugins after careful consideration, prefer simple generic tools like grep/rg, FZF, dumb completion and ctags over complicated tight integration with language servers and debuggers.

But maybe you prefer more integrated environments and that's perfectly fine, but in this case I wouldn't recommend a switch to Vim unless you have a very good reason to want it.

2 comments

Without plugins Visual Studio Code in principle is just an editor. Yet even without any plugins or language-specific support it still a better tool for development out-of-the-box than Vim or Emacs. It can quick open and search across a development tree with thousands of files with no configuration.

So as an editor for config files and small projects Vim without plugins is OK. But that basic Vim experience just does not scale. One does need plugins with Vim for anything big.

I mentioned FZF (with Rg) with IMO is a great plugin to use. With it you can explore huge projects very quickly without requiring any language specific setup. Vim also supports tags files by default which can be quite nice when browsing large projects, just run universal ctags and you can cross reference symbols for most languages.

Actually the only project-oriented Vim plugins I use are FZF, editorconfig and fugitive (git interface). The rest are just editor tweaks such as vim-unimpaired and vim-surround. And I regularly deal with very large codebases such as the Linux kernel, so at least for my use case it scales reasonably well.

> Yet even without any plugins or language-specific support it still a better tool for development out-of-the-box than Vim or Emacs.

ⓘ This claim is disputed.

> It can quick open and search across a development tree with thousands of files with no configuration.

M-x find-grep would like a word.

Before you say anything, Visual Studio Code depends on (and bundles) ripgrep to do its fast searches. (Emacs defaults to using your system's grep.)

> It can quick open and search across a development tree with thousands of files with no configuration.

    git grep

?
Checkout chromium and try that on its tree. Or rgrep. Then try searching it with vscode and compare the timing especially with second and following searches. And vscode is smart enough to search files that where opened recently first bringing useful results instantly.
Of course if you need to cross reference the entirety of a gigaproject like Chromium you're going to need some sort of a cache and smart search. If I was a Chromium dev I'd probably set something up to help with that.

99.999% of source trees are a tiny fraction of that size however.

As I mentioned in another comment I routinely hack in the Linux kernel which contains about 15million SLOCs (per sloccount) and ripgrep takes less than 5s on a cold run and is near instant after that. ctags lookup almost instant regardless of cache. And that's on a 5 year old middle of the line SSD and CPU.

Inability to easily deal with chromium-sized repositories out of the box might be a deal breaker for you but it's a total non-issue for me.

> One does need plugins with Vim for anything big.

When a fresh shell tab is just a command-T/ctrl-T away, you don't need Vim to do any of these things in the first place. The point of Vim is that it's a text editor that lives in an environment where you can already accomplish everything other than text editing.

VSCode is a text editor that uses plugins to bring other programs into VSCode. Vim is a text editor plugin for an environment in which all those programs already run natively.

The problem with basic Vim is that it does not support out-of-the-box tools that can run longer than an invocation of a single command, like language servers, project indexers, tree synchronizers etc. ctags etc. just does not scale. And on Windows and to lesser extent on Mac one needs that even for medium-sized projects.
For Python vim is allright. The probability of making syntax errors is a lot lower than with languages like Java and you can see them without going through a build. But language servers are the only way to make vim an acceptable choice for a lot of other languages. Otherwise your productivity is just much lower than with an ide. Personally i use vim for terminal work, searching, merging, editing sql and other files, sometimes building and Eclipse for coding on my current project.