List vim inconsistencies


Like many, I have a hard time deciding if Kakoune’s object-verb is “better” than Vim’s verb-object. It is tough to answer this question without being biased, and also the answer is not yes/no as there are advantages and drawbacks in both models.

However, I’d like to address at least one facet that could be part of the answer: which one of the two solutions has more “inconsistencies”. It feels to me that Kakoune has fewer special cases. A word always represents the same object whatever the verb as it is first defined. Same for inner-objects. They seem to be more consistent.

When I execute <a-i>{ it will select all characters inside the braces, including whitespace and newline characters. Then, if I want to only take full-line (and not include enclosing braces if they are on a different line for example), I can do <a-x> and it will trim the current selection to only contain full lines. It composes well. Also _ can unselect whitespace around selections. So instead of trying to guess what I want, Kakoune gives me the exact definition of what I executed, and then it is up to me to adjust this selection to my use-case.

In Vim, this is a different story. I know about those inconsistencies for instance:

  • cw is ce and so w means something different than in dw.
  • as operators are “pending-operator”, they cannot act upon “nothing” (current character under cursor), so it needs multiple operators for the same thing such as x and d, or s and c.
  • ci{ or di{ won’t delete the newline if the brace is on a different line and keep the indentation (which can be handy but which is not “pure” by definition).

Do you guys see other examples of such inconsistencies?

By the way, I am also interested in more global inconsistencies that are present in Vim and not in Kakoune (that are not necessarily related to the verb-object).

Thanks for your help.

One of my favorites:

  • Vim: u for undo <c-r> redo.
  • Kakoune: u for undo U for redo.

In Vim, moving to the beginning of the buffer is gg, moving to the beginning of the current line is g^, moving to the end of the current line is g$, and moving to the end of the buffer is G.

One of these is not like the others.

Meanwhile, Kakoune uses the hjkl keys to determine where to jump to, which is much more intuitive as we already use those keys for basic movement. gk is the beginning of the buffer, gl is the end of the current line, etc.

1 Like