| > they are useful in practice Useful, yes, but ad-hoc. > What do you mean by ad-hoc? I mean that in Emacs you have one ready to use action for everything you might want to do. One shortcut covers exactly one use case; if you want more use cases covered, install plugins or write scripts. M-q is an example, it formats the current paragraph. What if I want to format something other that a paragraph? In Emacs, you will need a new shortcut and a new keybinding for that. In Vim-like editors you have some small atomic terms that you can combine to build the actions. You can have a small number of atomic terms, which can be combined in a multitude of ways and therefore cover a multitude of use cases. In Vim the gqap is not a single take it or leave it action, it's a sentence with verb gq and noun ap. If you want the verb to act on something different, you replace the ap part with something else. Think of keybindings as a language you speak to your editor. In Vim the language has a number of words that you can combine to build sentences. In Emacs you have only a given number of ready to use sentences, and you have to memorize each one. This is a big distinction if we're talking about a text editor for efficiency, because it defines the ratio “time spent customizing” / “time saved editing”. > Could you point me to some example? You can cut and paste columns in Markdown tables using Kakoune's multiple selections. Like this: - <a-i>p -- select the paragraph - <a-s><a-;>; -- this creates a cursor at the beginning of each line - <a-f>| -- move cursor to the next pipe symbol (selecting everything as it moves) - <a-.> -- repeat the last move command (do this to select the column you want) - d -- delete the selected (by each of the selection) - <a-f>| (or <a-b>|) -- again to move cursors where you want to paste things - p -- paste the deleted column In this example, I haven't used a single command that I don't normally use while editing, say, Rust or Haskell. And you can manipulate Org, Latex tables with similar commands. In Emacs, you'd need a separate plugin for each of these, wouldn't you? Kakoune.org has more videos where they show what it can do (without plugins). |
You'd usually have a DWIM command, e.g. that it formats the region, but default to the paragraph if nothing else is selected. I have the feeling you are making this out to be a bigger difference than it actually is.
What I think is the mistake is that vim/kak are all just interfaces, while Emacs is software. Emacs can steal anything that any other program does, and have it combined with it's existing strengths, like the ball of mud that it is. And even without emulation modes, there is inherently nothing in Emacs that is stopping it from using the same kind of sentence mentality you are talking about (and that I am familiar with, I have used both, but prefer Emacs).
> In Emacs, you'd need a separate plugin for each of these, wouldn't you?
Plugin is the wrong word, you mean package, but not necessarily. Emacs has syntactic commands, that can operate on a major-mode specific definition of expressions, sentences, top-level definitions (defuns).
To do what you did in your example, I'd just use macros, recording this sequence:
C-a M-SPC C-s | (repeat C-s to select the column you want) C-w (again move cursors where you want to paste things) M-w
and then repeat that for all the following lines. Multiple cursors are just visualized macros, after all.