>Would you say a few words on what makes Kakoune modal editing better than Vim's?
I guess the big difference is multiple selections. In Kakoune Normal mode you can select multiple selections, and your normal mode commands operate on all those selections at once, and if you switch to insert mode you can insert text at all of those multiple cursors.
I had a paragraph with examples that I just deleted because it had sentences like "you would simply type s;<enter>b&" and that makes you sound like a crazy cultist. A better endorsement is maybe: where I would in the past write a script in python or awk to get info from a log or a csv I usually just jump straight to kakoune and edit the file down to the data I want.
Btw the reason I haven't tried kakoune yet is that the command is `kak`, which means 'shit' in my native language, Dutch.
I haven't used the vim plugin but if vim commands work on each selection that probably gets you half way. Kakoune additionally provides 's' and 'S' commands to sub select down from your selection iteratively. you might select all words, then select the _ in each word, delete the character and hit ~ to capitalize the next character to convert a selection of words in snake_case to camelCase. I think it's cool.
>Btw the reason I haven't tried kakoune yet is that the command is `kak`, which means 'shit' in my native language, Dutch.
I've actually heard this either on a forum, mailing list or a github issue at least once, lol. It's unfortunate.
> I've actually heard this either on a forum, mailing list or a github issue at least once, lol. It's unfortunate.
I think if someone really wants to use Kakoune they could do the same thing that I do with neovim, which is to make vim be an alias for the editor you actually want to use.
This is why I switched to vis (https://github.com/martanne/vis) after trying kak for a couple days (and previously being an nvim user). ^k and ^j add cursors directly above and below the current one, :x/foo/ selects all occurrences of ‘foo’ in the current selection or (if there’s no current selection) file (this is based on the command language of Rob Pike’s `sam` editor, and foo can be a structural regex), and then you can manipulate them using standard vi bindings.
set inccommand=split
(live substitution). Vim's confirmation prompts make it more comfortable, as well as off-screen matches it shows. Multiple selections are inherently limited to a single screen or you won't be able to see what you're doing.
Verdict: a gimmick.
It ends up being much more powerful because the editing language is strictly more expressive than regular expressions: you can select using a regular expression, but you can also use all the rest of the normal mode, such as select/jump to the matching parenthesis or brace (or whatever pair of text your language use to scope things), which is not possible to express in pure regex.
You are far from limited to a single screen, the `(` and `)` commands rotate the main selection, so you can inspect all your selections easily if you want to.
In my experience (as a long time Vim user and as Kakoune's main author) multiple selections end-up being much more attractive for quick edits where there's only a handful instances to replace than devising the correct regex/replacement pair, and their interactive nature makes them quicker to use than the macro alternative (which is also supported in Kakoune).
In summary: great job with Kakoune! I'm a delighted user.
I worked with large and messy codebase, where apparently there was always something more important than cleaning up.
Think about vim (and kakoune) as basically a highly interactive language for editing text. At least at a conceptual level something like diw is basically a function (d) applied to data (iw). Vim is completely scalar. The type of all the functions is more or less something like string → string. Kakoune is the APL of text editors. Multiple selections are an array of strings to operate on. It automatically maps the function (editor commands) over every selection. I find this extremely attractive and powerful.
At least for me kakoune blows all other editors out of the water. It really is quite good.
To me however multiple selections are not Kakoune's strongest point. It's the fact that in Kakoune you "first select, then modify", while in vim you go "action first, then subject".
Putting the subject first allows for a more visual experience in general - in Kakoune you can always "see what's going to happen" before it happens, because the object is always highlighted. The multiple cursors thing is just a manifestation of this approach. In Vim the experience is more "opaque" - you type some commands in normal mode and suddenly the text changes. As a result Kak is less prone to "accidental edits" like I get in Vim from time to time.
I've heard that some people "abuse" on Vim's Visual mode to get over this limitation. But that feels like a kludge to me. And it doesn't solve the accidental edits.
The advantage of it is that you can execute the "macro" incrementally and spot early when you've made a mistake, rather than recording a macro then letting rip and discovering, too late, that there was a mistake 80% of the way though, and now you need to undo the whole thing and and try again.
(I use multiple-cursors in Emacs for multiple selections, iedit-mode for live substitution (sometimes in combination with wgrep), as well replace-regexp for plain search & replace, and while they all overlap, none are poor versions of any of the others. They each have their strengths and weaknesses. However it's vanishingly rare that I use macros any more.)
If IDE works for you and you enjoy it, stick with it. I enjoy modal editing (Vim/kak) because it feels good. I don't have to move my hands from the home row and I'm a damn impatient person, so that fast editing just makes me feel a little better about "waiting for IO".
Unlike the other responder, I am actually not big fan of multiple selections and prefer search and replace. But once in a while multiple selections come handy even for me, so I don't mind them being there.