Live data from Hacker News

Ask HN: Is Vim still worth learning?

news.ycombinator.com

11–20 of 93 posts

Re: Ask HN: Is Vim still worth learning?

#11
We need an interface to translate our thoughts into the computer, and the keyboard and the mouse are a necessary evil for now. But if you chose a career of software development, you should strive to minimize the friction that interface introduces.

In my opinion, Vim/Emacs are the best way to make that interface as easy to operate as possible, since it completely removes the mouse from the equation. Along those same lines, I felt so much liberated after switching to i3, insomuch that I try to replicate the experience on MacOS, after switching over for work.

EDIT: Also, the obligatory "You don't grok vi" SO answer: https://stackoverflow.com/questions/1218390/what-is-your-mos...

Re: Ask HN: Is Vim still worth learning?

#12
For context, I have been using Vim as my main driver for 12+ years, now, and I have been heavily involved with the ecosystem (patches, plugins, support, etc.) for most of that time.

Learning enough Vim for it to pay off in terms of productivity and whatnot is quite a journey. If you are committed, it might take a couple months to follow chapters 1-12 and 20-32 of the user manual, which will put you in a better position than most Vim users. If your goal is really to be able to use Vim for Go and Rust projects, then there is no way around that first step, but if you somehow don't go all the way, then what you have learned will surely come handy next time you have to use Vim so there is no loss, here.

> do you think it's worth the effort to learn using VIM more deeply today?

I did that and I really love where I am. Will it click for you? I have no idea.

> If yes, do you think VIM is still fine, or rather neovim? Or something fresh like helix?

- Vim (not VIM) has been in active development since 1991 and it is not showing signs of slowing down. It is more than fine.

- Neovim is merely a fork with different goals. At a low level, the two tend to diverge more and more but when it comes to the core user-facing stuff like Ex commands, modes, operators, motions, etc. there is practically no difference.

- Helix seems promising but it is far less ubiquitous than Vim.

Everything is worth learning, whether you have an immediate use for it or not.

Re: Ask HN: Is Vim still worth learning?

#14
If you just want to learn the basics, you'll be faster with a "modern" editor with mouse and some basic keyboard shortcuts. But if you really master Vim, I would say it's faster and more powerful than any modern editor (and you can use it as an extension in VSCode). For me it's mostly navigating ( 213gg - takes you to line 213, $ - end of line, t) - next closing parenthesis,% jumps to opening closing parenthesis or similar when you're on it, and so on). Macro recording: qe - records macro in "e" ... do vim stuff ... q ... 10@e - execute your macro 10 times. Text substitution with regular expressions (:%s/th(i|u)s/that/g). I think it's not about "hjkl" navigation, that is a probably the tiniest improvement in speed (not lifting your fingers from the home row). But if you master the navigation part and learn how to solve more complex editing tasks with macros and regular expressions, then you'll be a lot faster than in a regular editor.

Re: Ask HN: Is Vim still worth learning?

#15

Yes definitely. Vim will be around for the rest of your career, long after VSCode or other IDE's have come and gone. Investing in tools and workflows that are properly open source, and have serious longevity has a big payoff.

Maybe... but OTOH, the IDEs that come after VSCode will still follow the UI guidelines that have been established for GUI tools during the last ~40 years, e.g. having menus where you can find out which functions are available, and then memorize the shortcuts for the functions you use most often, rather than having to learn everything "up front" before being able to become productive. I suspect one reason for the longevity of vim is the time that you have to invest in learning it...

Re: Ask HN: Is Vim still worth learning?

#16
You could just use Helix instead. `hx --tutor`. It enables the functionality of a 12-hour tuned Vim, out of the box, except faster and with less crashes / weird plugin interactions.

OP mentions they're open to comments about Helix... but you do you yall. The comment isn't hyperbole, I used vim for 15 years, but again, whatever.

Re: Ask HN: Is Vim still worth learning?

#18
IMO learning Vim today is absolutely worth it. Vim is a sort of "lowest common denominator" thing in text editing, it works great for SSHing into remote machines, `docker exec` into containers, and making changes when sitting next to a coworker who uses an insufferable (or badly configured) GUI editor.

As for the second question, differences between regular vim and neovim largely don't matter for learning vim, as the bulk of the changes is behind the scenes. Some plugins will depend on a specific vim version, but your muscle memory probably won't.

Re: Ask HN: Is Vim still worth learning?

#19
Yes 100%. Using the vim bindings for VS Code and that works great. Makes working without touching the mouse really enjoyable. Also being familiar with vim is a great fallback option if you're sshed into a remote machine.

Re: Ask HN: Is Vim still worth learning?

#20
I found that for Go development vim is really good. I tried Sublime, Atom and VSCode for Go development on Mac, but didn't feel comfortable with how slow they were, especially when trying to dig into an SQL dump. It could take a minute for the SQL dump to load. In contrast to that, vim can load and jump to any line in a MB-sized SQL dump instantly. Another great thing about vim is that you won't need to use the mouse/touchpad, though as others have mentioned there are vim-plugins for VSCode etc if that's what you want.

Vim package suggestions:

scrooloose/nerdtree - File tree navigation. jeetsukumaran/vim-buffergator - Work in buffers instead of tabs. fatih/vim-go - Jump to definition, format, auto-import, build and jump to error lines inside vim, etc.

Post reply on HN