logoalt Hacker News

autuni • today at 8:24 AM • 6 replies • view on HN

I have considered getting into Vim a couple of times because it always seemed like the thing to do, but never did.

It does not make sense to me that I should use an editor I need to study and practice for. It can't possibly that much more efficient, especially given that usually speed is not the limiting factor for what I do.

Maybe one day I will be tempted to find out why it's supposedly worth it again.


Replies

TonyStr • today at 9:03 AM

Does it make sense that you should use a keyboard you need to study and practice for? Because I'm willing to bet you didn't instantly learn touch typing the first time you laid eyes on a keyboard. I would also bet that you didn't know about ctrl c, ctrl v, ctrl x, multiple cursors, tab, and so many other things that you now take for granted in code editors and elsewhere. Vim is just like that - a little foreign in the start, but after using it for a while it becomes second nature. You can learn just the basics and be productive in a couple of days, then you have the rest of your life to learn the more advanced features like terminal mode or macros and so on. Though it seems most people (me included) get really excited about learning vim once we get into it, and start sprinting through a bunch of features. That can make it seem a bit overwhelming.

ThrustVectoring • today at 9:35 AM

The real strength of vim (and emacs, though I haven't learned emacs to know this firsthand) is the expressivity of it rather than the raw speed. When you can express an edit as a sequence of key presses, you can record and replay that to easily and make the "same edit" in many places.

The funniest time I did this was with a interview screening question which had a hundred-deep chain of links with the URL for the next link embedded in some JSON with some additional formatting required to get a working link. Vim let me copy a line of text that's a curl command, shell out to replace it with the ~6 lines of JSON response, edit that as a string down to a curl command to the next URL, and wrap that entire process up as a macro to run a hundred times.

➕ show 1 reply
glibg10b • today at 8:30 AM

For me, it's about comfort. No need to bounce my right hand between the home row, the arrow keys and the mouse. No need to stretch my left pinky to Ctrl and Shift for every shortcut. Everything is near the home row in Vim, by design.

➕ show 1 reply
wiseowise • today at 8:48 AM

> It can't possibly that much more efficient,

It is. And I’m not even an advanced Vim user.

> especially given that usually speed is not the limiting factor for what I do.

For me it’s not so much about speed as about comfort. Jumping into VISUAL and selecting something in a block, yanking the line, jumping pages, editors, searching within the file, filtering, sorting. And the most important part is that because it is so old and widespread there’s pretty much vim mode for any editor so I can use the same shortcuts between vim, VScode, IntelliJ, etc.

ro-ka • today at 8:42 AM

I felt the same and never got into vim. What clicked for me however is helix and I love it. Brings everything out of the box and the mental model fits me better (select, then action).

https://helix-editor.com/

bbeonx • today at 8:54 AM

(a) vim is super powerful (b) vim is way faster to edit, navigate, etc (c) it really doesn't matter that much

do the thing you enjoy :)