83 points by sebg 3 hours ago | 18 comments
palata 1 hour ago
I have been using vim for 15 years. I disagree with the idea that it makes me more efficient than someone else. First, because I have friends who don't use vim and are very fast. Second because most of my time as a developer is not spent writing/editing text.

No, I love vim because of its ergonomics. If I use a mouse for too long, my arm/shoulder starts hurting. Maybe I could improve the ergonomics of my mouse (having a vertical mouse already helped), but using vim and a tiling window manager allow me to drastically reduce my use of the mouse. It makes me more efficient than me when I use a less ergonomic setup, sure. But that's me.

It's all about ergonomics, and everyone is different. It's okay to be faster with a mouse or on an iPad.

BrouteMinou 19 minutes ago
I use vim to avoid the mouse-keyboard back and forth. I also happen to edit multiple types of file, which I find useful to have / learn only 1 editor/IDE.

I am also often, if not always, in a terminal.

Some people use vim to brag, some say it's for speed, for me it's because "it's there".

gcarvalho 1 hour ago
One thing I really appreciate about Vim is that it just opens. And I don't mean speed, I mean not getting bunch of pop-ups nagging me to do something about a configuration, extension, feedback or whatever.

I'm not going to claim Vim's defaults are usable for most people, but my god can these IDEs just shut up and let me see my code? I'll go to the settings if I want to.

PhilipRoman 27 minutes ago
Sorry Dave, you'll need to create a project, configure the SDK and log in with your GitHub credentials before I can let you edit README.md
volemo 43 minutes ago
> can these IDEs just shut up and let me see my code?

May I interest you in some Emacs? It’s arguably much more of an IDE than Vim, but it still “just opens”. And you can bring your muscle memory with you thanks to the Evil mode.

rgoulter 2 hours ago
It's funny to see Helix mentioned, without kakoune being mentioned.

Helix is a really nifty terminal editor. It aims to be nice out-of-the-box, to have good LSP support, DAP support, and Tree-Sitter support.

Compared to vim's "action motion" keybindings, Helix goes for "motion action" (which kakoune popularised). I find this is frequently more intuitive.

Helix also has neat discoverability.. with pop-ups showing you what the available keybindings are.

chongli 48 minutes ago
I’m not a fan of motion-action. Most of the time in vi, all I’m doing is moving around. When you input a motion key in vi it moves you accordingly with no fanfare.

The motion-action paradigm, on the other hand, primes the editor to expect an action. In many cases this leads to multiple cursors being left in your wake, which I find really distracting.

I think this stems from a fundamental misunderstanding of the vi paradigm: the primary purpose of vi was to extend the traditional line-editor ed (which was designed for editing through a paper TTY terminal) to full-screen interactive editing on a video terminal. Since early video terminals had very low baud rates, vi needed to be very efficient at reducing screen redraw. It just so happens that this emphasis is perfectly matched to the most common editing loop: jump to a location within the file and insert/delete/replace some characters. Thus vi happens to be perfectly optimized for this editing workflow and so I believe this is the reason for its enduring popularity.

The other task which vi is strong at (but which is otherwise secondary) is editing in the large: making multiple changes to a file simultaneously. This, I believe, is the primary strength of motion-action paradigm editors. In other words, they get it backwards! Thus they can’t help but annoy me while I’m working with their constant attempts to infer large-scale edits from my simple desire to jump around the file and make small changes. They are giving me a freight train when all I want is a car.

msdz 2 minutes ago
As someone familiar with Helix, I’m curious. Could you elaborate on this?

Because I’m not disagreeing with your point, I’m actually not getting it in the first place. How does jumping around affect your selection count? Which motion(s) are you performing that larger quantities of text are getting "selected" in the first place?

Macha 1 hour ago
I've been experimenting with Helix in the last month.

One thing that's slightly frustrating is the key binds are running interference in my brain with the vim keybinds. Especially the x/d swap. It might be because I still use vim keybindings in other programs, but I find I'm now also worse at vim than I was before I started helix.

The discoverability is definitely a big nice feature, I definitely use more e.g. tree-sitter motions because I can actually remember them unlike in my plugins in nvim.

drekipus 2 hours ago
I think kakoune invented motion action keybinds, but Helix is the one popularizing it.

I love helix because it is very fast, it supports everything it needs to, and the built-in help/which key. It's what I wish vim was.

Shameless self-promotion of a discussion thread I started.

https://github.com/helix-editor/helix/discussions/13399

klauserc 1 hour ago
I found Helix much easier to get into than vim because you can see and experiment with the selection before committing to an action. It's also much more familiar to users of modern software (where you generally first select an object and then apply an action).
lawn 43 minutes ago
My problem with the "action motion" keybindings is textobjects that by necessity becomes more complex or even missing. This is a big step backwards in ny opinion.

There are also plugins that shows a pop-with with available keybindings if you want.

inatreecrown2 1 hour ago
I want to use Helix but can't until it supports running external commands.
mac9 49 minutes ago
[dead]
submeta 1 hour ago
Yes, it’s super handy to be able to record an Emacs macro and modify large text within seconds, something that would take me half an hour. Yes, it’s super cool to navigate text at lightning speed.

But honestly, I have seen engineers who work with the mouse to navigate, and use nano to edit text in the terminal, and IDEs from intelliJ to navigate their codebase, engineers who were 10x as productive as I was. Why? Because in the end navigating your text is not what determines engineering success. It’s convenient, yes, but that’s not the core challenge. These days devs using VS Code can be magnitudes more productive just because they focus on the things that matter.

Edit:

Don’t get me wrong. I love my (mechanical) keyboard. I hardly use the mouse. I have a shortcut for everything using Keyboard Maestro, Karabiner elements, and I use Emacs for text editing, and all of that makes me super fast using my computer. But all of that does not make you a better engineer (I am not an engineer anyway). So spending time on other qualities (being able to do research, to solve problems, to manage knowledge, to communicate well, to document well) is way more relevant for your success as an engineer.

bspammer 1 hour ago
Yes people who talk about vim being more efficient, are in my opinion, misguided. For me it's very little to do with efficiency, and much more to do with creating a more pleasant experience writing text, especially text with an exploitable structure (code).

I really enjoy precision, and that's what vim provides. It's the same reason I'd much rather play an FPS video game with a mouse and keyboard, than an analog control stick. And the same reason I hate doing anything important on a touch screen.

skydhash 46 minutes ago
Vim is not about speed. It’s about efficiency (less effort) and programmability. You can do the same or more editing actions with other tools, but with Vim (and also Emacs), you can make it effortless.
lawn 53 minutes ago
> Because in the end navigating your text is not what determines engineering success. It’s convenient, yes, but that’s not the core challenge.

That's true, but it's still very helpful.

I'd argue that programming isn't the core challenge either, but it would be foolish to dismiss it entirely.

yanis_t 1 hour ago
Vim is great. Several years ago I noticed the lack of books focused on the development experience, e.g. how to build an IDE-like experience in the era of language servers, and wrote a book about it[1]

A sad thing is that many people still believe that Vim is something mosty outdated and it’s hard to make it as useful as VS Code. But in fact it’s pretty much the opposite. I also think that the infamous steep curve is not so steep in reality.

[1] https://yanis-t.gumroad.com/l/vim4devs

JSR_FDED 2 hours ago
Separate from the usually mentioned benefits of Vim, it cured my RSI completely.
loloquwowndueo 1 hour ago
Ditto, I switched to vim after horrible pain from eMacs’s required multi finger contortions and it helped to the point rsi hasn’t been an issue for me for 20 years.
1 hour ago
seafoamteal 1 hour ago
Yesterday, I used vim motions to clean up some JMH benchmark log data to a CSV. It was genuinely so useful to be able to precisely delete and replace based on regexes. I'm sure I could have done with a graphical find and replace, but it was definitely faster via vim, especially after recording macros to automate the repetitive edits.
Kichererbsen 1 hour ago
Yes. So much this. I've also always loved combining that with the macro functionality.

Except: Yesterday, I used an LLM (4o-mini-high) to do this kind of task instead and i might never go back.

bcrack 1 hour ago
I think an important part of the Vim workflow that I haven't seen mentioned is the fact that -at least for myself- it keeps the mind engaged during "menial" operations.

When switching from dealing with the information included in the text (typically thinking about code content) to operations of moving text around and other text logistics, I often find my mind "waiting" impatiently for my hands when using non-vim editors. In contrary, when using vim (I consider myself a mid-range user), I can somewhat remain closer to the flow.

At the same time, I still remember (albeit vaguely) a significant overhead of the Vim language before becoming acclimated.

lukasstoecklein 28 minutes ago
I don't understand why people say there is an overhead. Press 'I' for insert mode gives you the same behavior as non-vim, so your immediately at the same efficiency. What am I missing?
SaintRomuald 1 hour ago
I tried vim motions as a daily driver many times but, I don't think that with today's expansive IDEs vim motions are all that superior. IDEs have very competent shortcuts and features built in.

My biggest problems with vim are lack of feature discoverability and the fact that you can't change the keybindings. It's very hard to learn new things in Vim without specifically googling for them. It's highly likely that if I sat down to some online course I could learn a lot more about the Vim way of editing but I could never sit through one long enough to discover new things, so most of the things I learn about Vim come from me specifically looking up how to do certain things, not a bad way to learn, but I feel like I never got extremely proficient becasue I didn't go deep enough.

I find a lot of the keybinding to be unintuitive or not very ergonomic or inconsistent, but I also don't want to rebind anything because part of the reason vim is so useful is the fact that you get this tool with every linux install and changing things means you're no longer using The Vim. On the contrary it feels perfectly fine to tweak your IDE's keybindings because that IDE is already very specific to your needs.

lloeki 57 minutes ago
I don't think anyone claims vim motions are superior in absolutes with a straight face.

I like a nearby comment that essentially says "it's not superior for everyone, it's just infinitely better for me; also it doesn't magically make anyone 100x better than the next developer".

I've seen people using IDEs and flying around massive codebases at incredible speeds, all the while they're completely mystified by even the simplest vim editing.

Me? Put me in front of an IDE and painfully witness the absolute grind: I'm a sitting duck; but in Vim I feel like my brain is plugged straight into the computer: I don't even think about my hands, code is conjured just by thinking about it.

chongli 1 hour ago
Yes, vim is not intuitive. It doesn’t teach itself to you. It takes hard work. I bought the O’Reilly vi/vim book [1] and read it cover to cover. I practiced a lot of things and was very deliberate about it.

To me, learning vim is like learning a musical instrument. You’re not going to get there without committing to it. For many people that’s just not going to happen: they have neither the time nor the inclination/energy to do it. That’s totally fine! There are loads of other tools for people to use and they get by just fine without vim!

I think my main complaint is that there aren’t a few more tools like vim. Almost all software is designed for people to be able to pick up casually and be able to get work done at a passable level of productivity without ever reaching mastery and flow state. Tools like that (easy to use but with no real incentive for mastery) are deeply unsatisfying to me for a lot of reasons.

I guess what I’m saying here is really just a restatement of “Worse is better” [2].

[1] https://www.oreilly.com/library/view/learning-the-vi/1565924...

[2] https://en.wikipedia.org/wiki/Worse_is_better

lll-o-lll 27 minutes ago
This “worse is better” is very interesting. Are you suggesting vi/vim is an example of “the right thing”, vs a “New Jersey” style?
jerrygenser 1 hour ago
You can absolutely change the keybindings, vim is programmable.
SaintRomuald 48 minutes ago
Yes, but I meant that in the sense that when you change vim, it's no longer the vim that ships with Linux distros. It stops being the universal tool and starts becoming your custom text editor,and to me the biggest advantage of vim is how you're going to encounter it everywhere.
Hnrobert42 56 minutes ago
Exactly. See .vimrc.
NalNezumi 1 hour ago
I use vim & vim bindings for most editors I have (VS Code, Obsidian) and I think there's one thing always missed in this conversation (at least on HN): The changes that happens in your thinking when you start using a tool. Instead we get stuck on pros/cons of tool A vs tool B.

I got in to vim in college for two reasons (the real) one was just that I wanted to look cool, and the second one was to relive my hands of discomfort. It was also around the same time I started to look in to QWERTY vs Colemak vs Dvorak, although I didn't go further with that, I quickly realized that the keyboard layout of my country (Sweden), while similar to US/UK QWERTY placed brackets in absolute garbage positions that caused strain in my right hand a lot. Then also the excessive pressing of left/right arrow + moving right hand between mouse & keyboard caused further strain.

Vim alleviated that with the word/Word/sentence navigation being more spread out, and "stick to home-row" philosophy.

But there was an additional "shift of thinking": editor as a (limited) programming language. Being able to store macros, navigate depending not just on line/character but chunks such as word & sentences made me realize I could do things such as:

"In this XML/URDF file, replace all elements with the name=X with the logic Y, which might including adding/removing xml elements/attribute"

without having to use some scripting (python + parsing etc). The process of figuring that out is also interactive. Try out a bunch of commands, stitch them together as "macros" and then make macros that calls macros that use copy-paste registry.

If I stuck with Sublime, or VS Code, I don't think I would've had that epiphany. It even helped me (non-CS guy) to understand programming better.

Perizors 32 minutes ago
Are you using qwerty still?
NalNezumi 19 minutes ago
I'm still using QWERTY yes, but I use US/UK keyboard layout for coding, and others for writing messages (SWE/JP for me).

I realized that it didn't make much sense when I already have 3 QWERTY mappings in my head, and moving all of those 3 mappings to Dvorak / Colemak when those two are based on ergonomics pattern of the English language, when I type in 3 languages.

tdiff 59 minutes ago
Is not vim a tool from an age of very much different terminals to what we have today, with different limitations that are no longer actual?

Yearly(!) emergence of new tutorials trying to finally explain how to navigate with vim is a consequence of this disconnect.

ablob 36 minutes ago
Funny enough, I believe that there are quite a lot of tutorials and that itself is the issue. Everyone wants to make their own since they deem the others to be bad and then a new subpar tutorial is created, making it even more difficult to find the few helpful articles. This ends up becoming a vicious cycle.

In the end I find comparing vim to something like snowboarding or skateboarding intriguing. It doesn't matter how much you explain it, it won't be enough. You just have to try it out for yourself and see if you can get the hang of it. Once that initial step is done, that's when reading about all the intricacies becomes useful.

palata 54 minutes ago
Well vim comes from a different age, but it is still completely viable today.

Because you can have a GUI and a mouse today does not mean that you should not use the vim bindings. I use vim a lot in terminal (both locally or over SSH), but I also use vim bindings in graphical IDEs. Actually, I struggle if the editor doesn't have vim bindings. VScode, IntelliJ, even Xcode has vim bindings.

Perizors 36 minutes ago
One of the problems is that vim is so entrenched with the QWERTY layout that any shortcut is too cumbersome in colemak
lkuty 1 hour ago
I like https://www.barbarianmeetscoding.com/wizards-use-vim/introdu... but it looks like it is not complete, unless I am mistaken
windowliker 58 minutes ago
Badly titled post. "Vim Language" is usually used in reference to the "VimL" scripting engine inside Vim.
hatmatrix 2 hours ago
I've tried Vi/Vim key bindings on several occasions, but just couldn't be efficient in it. It's often touted as the "superior" form that confers benefit to those who invest time to learn it, but discussions with other coders have led me to believe this is just confirmation bias by people who prefer these key bindings.

There are people like myself who edit frequently while writing (even with in a single sentence or word), so this switching between normal and insert modes to do chunks of each operation at a time incurs a heavy cost. Yes, there is Ctrl+[ for single commands, but this is still an additional step compared to the key chord model of Emacs for instance.

eviks 7 minutes ago
> who prefer these key bindings

Which ones? Do you mean the unergonomic defaults where one of the most popular action (quitting to normal mode) is bound to one of the most inconvenient keys (Esc)? Also for editing within a word you actually don't need to switch between modes, but instead could use something like a home row cursor with a modifier to move in insert mode.

susam 1 hour ago
I use both Vim and Emacs, extensively, so I'd just like to share my experience with mode switching in Vim. Personally, I don't find Vim mode switching to be much of a problem while editing text. It has become muscle memory to stay in normal mode by default. After any insert-mode operation, I instinctively return to normal mode. It's just a habit at this point.

Take, for example, writing a for loop. I might type:

  for (int
Then, say, I pause briefly to think about the variable name. If you happened to look over my shoulder at that moment, you would find me in normal mode. Even if I only pause for a second, I reflexively return to normal mode the moment I stop typing.

Because of that, I don't really treat insert mode as a separate "place" in my mind. Let's say I want to insert the text "abc". I don't think, enter insert mode, type "abc", then return to normal mode. I just see it as a single action in normal mode that includes the key sequence "i a b c ESC".

Or say, I want to open a new line above and insert "xyz". Again, I think of it as a single operation in normal mode that includes the key sequence "shift+o x y z ESC".

This applies to all insert-mode operations for me. Normal mode feels like "home" and insert mode is just an editing phase I dip into when I need and exit. That's why it doesn't feel like I am constantly switching modes (even though I am).

tmtvl 1 hour ago
I used Vim for 5-ish years and I kinda got into that mindset, but on occasion I would fail to switch to insert mode (I think by not hitting the i or a key properly, but when in the flow I don't really pay attention to what my hands are doing) and stuff would go haywire. After 5 years of that happening intermittently I got really fed up with it and I started trying various alternatives.

I have been using Emacs for about 6 years now and when I fail to engage a modifier key properly all that happens is that I type some text in the active buffer. If I really manage to do a silly mistype, I can just hit C-h l to show my recent keystrokes to find out what I did.

NalNezumi 48 minutes ago
I think one (often forgotten) good advice to get used to the mode-switching is to move the ESC key to Capslock on the keyboard. It's tedious to learn to always go to the ESC key, upper left of the keyboard. Capslock is available from home row, and you should probably not use CAPSLOCK anyway, it's a bad practice.

Put ESC key there instead and vim becomes wayyyyyyyy more ergonomic.

eviks 2 minutes ago
at most one y in way since Capslock is an unergonomic key in itself - it requires an unergonomic lateral movement of your weakest finger of your weaker hand
cbm-vic-20 19 minutes ago
I map 'jk' in Insert mode to <Esc>. In Insert mode, it takes me out to Normal mode. If I'm already in Normal mode, it simply moves down a line and right back up. This habit is so burned into my muscle memory that I often end up typing 'jk' into non-Vim input areas (like this HN comment box).jk
susam 41 minutes ago
Indeed! Sometime between 2010 and 2015, I used to often work with Windows computers, so I wrote a tool for myself back then to remap Caps Lock to Esc on Windows machines:

https://github.com/susam/uncap

While it was certainly possible to do that by editing Windows registry (and I have noted those techniques too in the README), registry changes couldn't be enabled or disabled without a reboot. That's what motivated me to write the above tool. And indeed, having the Caps Lock work like Esc made using Vim a much better experience!

lloeki 1 hour ago
> Take, for example, writing a for loop. I might type:

> for (int

> Then, say, I pause briefly to think about the variable name. If you happened to look over my shoulder at that moment, you would find me in normal mode.

I personally wouldn't but that's only because even in the case above I think in the same way as you mentioned next:

> I just see it as a single action in normal mode that includes the key sequence "i a b c ESC".

in the sense that I will ESC only after I have instered a "semantic-ish unit", which would include the variable name.

So I'd probably enter:

   i for (int foo; foo < 42; foo++) ESC :?foo nnn cw
and think there (and finalise with ESC N . N .)
quotemstr 1 hour ago
It never made any sense to me that people claim Emacs has no modes. What do you think you're doing when you hold down a modifier key? What else would it be except entering a mode in which other keys have a different meaning? Is that really different from vim's mode switching? They're just different ways of expressing modifiers.
StopDisinfo910 1 hour ago
I don’t know I edit a lot but I also really like vim motion. It gets really natural at some point. The mix of b and e to move around, using cw or ce to remove and start editing then getting back to moving around. Plus a lot of edit actually happens straight from normal mode (case correction, one character changes, short deletion).

You don’t really think about the modes because things flow naturally. It might also be due to the fact that I nearly never actually switch conscientiously into a mode. I always do actions which send me in insert (like c and o, very rarely I or A) and revert back to normal when done.

Plus vim has the advantage of making things like just remove everything between these symbols and set me in edit there very easy which is something I miss when I don’t have vim bindings.

bspammer 1 hour ago
I don't think it's the keybindings in particular that people love about vim, you can rebind everything after all. I'm attached to vim keybindings in the same way I'm attached to qwerty keyboards - something had to be the default, it's fairly arbitrary, and there's very marginal benefits in switching to a different set of bindings.

It really is the modal editing style that's the main draw. Someone who edits frequently should find vim more convenient, not less, but it does require a lot of time to learn all the available commands and burn them into your muscle memory.

lkuty 1 hour ago
Yes, the default. That's why, although I am french speaking, I switched a few years ago from azerty to qwerty keyboard just to be using the keyboard used by the people who programmed the default in editors like vim and emacs. Otherwise it is just a PITA. Should have done that from the very beginning I was programming. With Karabiner and Goku I have been able to configure some key combinations to get accented letters like righr alt+e for é, right shift+right alt+e for è, ...
lawn 50 minutes ago
> There are people like myself who edit frequently while writing (even with in a single sentence or word), so this switching between normal and insert modes to do chunks of each operation at a time incurs a heavy cost.

I edit this way too and there's no heavy cost here. Well, maybe when you're first learning and switching hasn't become second nature, but when you do it's not something you even notice.

000ooo000 2 hours ago
Here come the "[..] anyway I'm happy with VSCode" comments
tgv 1 hour ago
I've grown up on vi and later emacs, but VSCode is no joke. It does almost everything, and most of it better, and more intuitively. There's no reason to torture yourself with counting characters, words or lines in order to get the delete command correct in one go.
metaltyphoon 25 minutes ago
> There's no reason to torture yourself with counting characters, words or lines in order to get the delete command correct in one go

No one proficient in vim does this. Just use relative line line numbers or delete words in full with ciw.

sgarland 55 minutes ago
The single most intuitive ah-ha moment I’ve had in Vi was the change verb. Change In <object>: ci( means “change the text within parentheses.” Change unTil <object>: ct& means “change the text until an ampersand.” And so on. It just makes sense.

VSCode never had moments like that for me. It’s fine, sure, but it wasn’t anything special.

vachina 2 hours ago
Vim feels equivalent to a horse carrier in comparison to vscode to a modern car.
PaulRobinson 1 hour ago
To me, vscode feels like a huge truck with too small an engine, and vim feels like a sports car.
wildknocker 1 hour ago
Also comes with all the downsides of a modern car (ads, random BS, blackboxes, etc...)
w4yai 1 hour ago
I feel like those trying to teach me Vim are the same who refused to learn to use VsCode.

Once configured, I can do the same than Vim. With more features.

sussmannbaka 1 hour ago
> Once configured

is doing some heavy lifting here. "Once configured" vim can do the same you can do in VsCode. Editor wars are really the dumbest nerd fight.

PaulRobinson 1 hour ago
You do you, but I'd be curious to hear what you think you can do in VS Code that you can't do in vim - what these "more features" are. Vim, and Neovim, have an expansive plugin culture. They are designed to be very configurable and customisable, so that the software fits around you and what you need to do. What features do you find missing?

Also, I get that you feel vim users are being a bit evangelical - "trying to teach", as you put it - but I can assure you that I, for one, have used VS Code plenty (including using vim keybindings), and it's just not very good for me. It doesn't fit me.

It's slow, it's not as configurable to my needs. I sometimes have nothing more than my iPad Pro (and magic keyboard), with me - I can mosh/ssh into a dev box, tmux up a session get to work easily, I never found a nice way to make VS Code work in this pattern.

What's the point in being a software engineer if you can't have software that fits you? Yes, vim has a learning curve, but then I get to make it my own and make it fit what I need. Same with tmux, my shell, and so on. In my experience, VS Code forced me a little more to fit to it rather than the other way around.

Like I say, you do you, but don't think all vim fans are talking from a place of ignorance.

cess11 1 hour ago
I find VSCode to be sluggish and buggy, especially plugins, and also gave up on figuring out how to rebind jk to Esc. I also don't trust the telemetry flag, so I'd rather not open any proprietary projects in it.

It also can't run in a terminal, as far as I know.

lawn 47 minutes ago
Such a bad take as once configured Vim can do everything VSCode can and more.
quotemstr 1 hour ago
Technical moncultures are bad. The VSCode people ought to at least tolerate VSCode refuseniks as a kind of endangered species, worth keeping around out of a mixture of sentiment and insurance against memetic stagnation
1oooqooq 2 hours ago
don't forget to do a conversation class on speaking regex fluently.
kavith 1 hour ago
I’ve been using vim-extensions on VSCode/ Zed/ SQL Editors for a few years now and always thought I had the best of both worlds with this setup. But after switching to Cursor it seems like simply hitting tab is a lot faster than performing a vim motion in most cases and so I don’t see why people would still need Vim in 10 years time.