Hacker News new | ask | show | jobs
by gnull 1842 days ago
I see the point. The Emacs way can also be seen as object-verb, it's just that object is given via selection. I don't have any objections to what you said, maybe I was wrong about Vim/Emacs difference.

But. Kakoune is still something bigger for me. It does take text editing to a new level and it does make it more efficient. It is similar to Emacs in the sense that both follow the sequence “select and apply an action”. But Kakoune has richer selection primitives and has actions that work on multiple selections at the same time; this can be done with macros, but it's by far less convenient.

In your example, you can record a macro and apply it to all the lines of a table. Will you have to do it for each line one by one? Can you say, “run the macro on each line of this paragraph”?

> You have instant feedback while recording a macro too?

Sure, but not on all the places where you're going to apply it at the same time. And your macro may not work correctly on some of the lines, you will not see it while recording it. With multiple selections you see it immediately and can undo the last action and try again.

Multiple selections stay there after you apply actions on them. After you apply something, you can see the result and slowly think of the thing to do next with them. With a macro, you will have to type in the whole sequence when you record the macro.

Macros can achieve the same things, but they require more mental effort and are harder to get used to. And when you're focused on your code, the mental effort it takes to used your editor matters.

In the same way, multiple selections are an improvement over Vim's tradition of shooting regexes at your text; for the same reasons: interactiveness and instant feedback.

1 comments

> But. Kakoune is still something bigger for me

I have to admit that I have never seriously tried Kakoune. It has always been to similar but not similar enough to Vi(m) for me to work with.

> Can you say, “run the macro on each line of this paragraph”?

Yes, apply-macro-to-region-lines (C-x C-k r) does that. Of course you'd have to select the paragraph first (M-h).