by andrewflnr · 4y ago · 0 comments
- dedication to quick feedback
- scriptability and plugins
By "quick feedback" I mean things like multiple selection support, so you can tweak and polish a complex search-and-replace and inspect each step of the process as it happens, instead of writing a complex regex, undoing, and starting again from scratch.
I also mean things like pervasive completion and tool-tips. When I type `:set` I don't just get tab-completion of option names, I get a browsable list of option names and a tooltip describing the syntax of the `:set` command. And once I pick an option, that option's docstring is added to the tooltip so I can see what values the option expects.
By "scriptability and plugins" I mean there's no special directory structure to make a plugin - just take the commands you'd type in the editor, stick them in a `.kak` file in `~/.config/kak/autoload` and you've got a plugin you can share with your friends. If you have a complex editing operation you want to script, you don't need to learn a whole different "long-form" syntax for each command, you can just say `execute-keys` and write out the keys you would press to do the thing. There's more ceremony and polish you can add if you want (like all the fancy completion built-in commands have) but the effort required to automate my tasks is damn near zero.
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.
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...