There are only 2 usecases where it was of any value to me: If I have to write multiple lines in a similar fashion, or if I have to edit the same thing in a similar fashion in several places at once.
Both can be done much easier by using a regular expression.
Also `dw` sounds more logical if you think about user input speed\pauses. If I press `w` I want to move to the next word immediately. In case were `wd` deletes a word - there should be some lag, no?
Mnemonically the vim order works better for English but in practice I find the visual feedback from selection better for anything even moderately complex. An example would b `f` or `t` since I tend to hit the letter I was aiming for earlier than I was expecting.
> In case were `wd` deletes a word - there should be some lag, no?
There's no animation or forced latency. For a short motion that's predictable like `w`, you're typing the d before you actually check the result and it's just as fast as vim but in the opposite order.
It should be noted here that Vim more or less works like this in visual mode. If you go "v <motion> <command>" instead of "<command> <motion>", you can visually confirm the range. I can see the argument that it should be the default, though I like the fact that <motion> alone in normal mode just moves you around without preparing for a command.
vwww
selects the next 3 words visually. I can now press `d` to delete them.On the other hand, you cannot do something like "delete 3 words" in kakoune. "3wd" just takes you to the third word and deletes that.
Deleting 3 words is definitely slower. And it's kind of infuriating...
What am I doing wrong?
That is, counts work, it’s the movements that are slightly different. See manual §3.4–6[1].
Yeah, I just realised we are talking about normal mode basically...
Yes, as single command typed in isolation whether dw is better or wd is better is a matter of personal subjective opinion.
But, where object-verb (wd approach) becomes objectively better is that it composes with subsequent editor commands in a way that verb-object (dw approach) does not.
Editing is all about performing operations on text. You can first make increasing complicated selections, review them as they are being built up and then decide what to do with them in the end with the object-verb paradigm.
All this is difficult to describe textually. Try to checkout some Kakoune editing on YouTube or do it yourself by looking at the TRAMPOLINE tutorial [1] and you might come around to the `wd` school of thought!
[1] https://github.com/mawww/kakoune/blob/master/contrib/TRAMPOL...
Do you really need this feedback though? I can understand this when yanking, but if I'm going to delete the word... The whole action take much less that a second and then I proceed with my task.
Well, to each their own I guess
>multiple cursors (from a different comment)
I agree that in this kind of case motion first may be a way to go. Basically it should look like `search && replace`. Without actually doing search && replace.
Even in the case of simple "wd", sometimes I have multiple cursors I am operating on at the same time (e.g. from complex regex or just through selecting multiple lines at once) so each cursor could point to fairly different things. Then, the visual feedback becomes very useful.
You can do all this in Vim, I'm sure, but it's less mental effort in kak, because to a much greater extent you can see the results of your actions before they happen. And it's no slower if you do happen to know exactly what you're doing, because it's almost the same keystrokes in different order.