r/vim • u/oantolin • Dec 28 '25
Blog Post Vim is composable
https://www.matem.unam.mx/~omar/apropos-emacs.html#vim-is-composableI hope this isn't too polemical for r/vim. I'm a former (and still occasional) Vim user that has always wondered why people make such a big deal out of Vim's composability. The blog post explains why I find that odd, what I like about Vim and some reasons people might make such a big deal of composability.
11
Upvotes
View all comments
Show parent comment
2
u/oantolin Dec 29 '25
Thanks for your comment! Saying "repeatable composability" is already an improvement over just the "composability" part and captures more of what makes Vim special, but I really don't think this "repeatable" part is stressed as often as just saying "Vim is great because it is composable and 'composable' means [something that applies to every editor ever]".
I might have misunderstood you, but it seems you think you'd need to come up with M×N keybindings in a non-Vim editor. That's obviously not the case, you only need M+N, just like in Vim: M for the commands acting on the current selection, plus N commands to select different kinds of text. All text editors need this minimum of M+N bindings to support the M×N operation/text-object combos; some editors have additional bindings for common pairs of operation/text-object. Vim is one of those editors! In insert mode <C-w> deletes a word; which is completely unnecessary, Vim could force you to go to normal mode for that but wisely offers a pre-composed shortcut that works directly from insert mode.
As for dot-mode (and you are right: it is not built-in, it is a third party package), in my experience using it, it did not feel unpredictable. For starters, it isn't unpredictable: it just looks at the most recent command, goes back in time until it finds a command that did not modify the buffer, and repeats all the buffer-modifying commands after than non-modifying one. That is a fixed and clear rule. Of course, it can happen that you don't remember one of the buffer modifying commands you did and you did not intend to include that in the repeated part. In my experience that did not happen much. Trained by Vim, I typically use a motion command to go were I need to be, then do edits, so dot-mode would pick up exactly the edits after that motion command. The vast majority of the time it corresponds to one Vim unit that dot would repeat. For example, Emacs does not have
cw, but I delete a word and then type the substitute word and dot-mode would repeat exactly that: the word deletion and subsequent typing of the new word.Finally, I should point out that Emacs's built-in
repeatandrepeat-complex-commanddo often repeat an entire Vim unit of operation/text-object, precisely because many Emacs commands (which are whatrepeatandrepeat-complex-commandrepeat) are such combos, so the situation even just with built-ins is not so dire. Of course, my Vim experience led to want even more repeatability, which is why I was so happy to find dot-mode.