News for hackers. Stuff that matters.
Re:Why Kakoune – The Quest For a Better Code Editor by galkk on Wednesday June 21, 2023 @06:37PM (#36425651)
I find this part very compelling

    vi basic grammar is verb followed by object; it’s nice because it matches well with the order we use in English, "delete word". On the other hand, it does not match well with the nature of what we express: There is only a handful of verbs in text editing (delete, yank, paste, insert… ), and they don’t compose, contrarily to objects which can be arbitrarily complex, and difficult to express. That means that errors are not handled well. If you express your object wrongly with a delete verb, the wrong text will get deleted, you will need to undo, and try again.

    Kakoune’s grammar is object followed by verb, combined with instantaneous feedback, that means you always see the current object (In Kakoune we call that the selection) before you apply your change, which allows you to correct errors on the go.

Unfortunately, I'd rather see this as an alternative input mode in vim/vscode/nvim than separate editor, so I won't need to throw away all knowledge/plugins/dotfiles accumulated over time, than switching to completely new editor. Baggage is hard.
Re:Why Kakoune – The Quest For a Better Code Editor by ambicapter on Wednesday June 21, 2023 @07:19PM (#36426088)
I love the way he is basically modelling the way we interact with an editor as a grammar, or in mathematical terms. It's so interesting what kinds of designs you can come up with when you can successfully apply a different way of thinking about it.
Re:Why Kakoune – The Quest For a Better Code Editor by celeritascelery on Wednesday June 21, 2023 @07:23PM (#36426127)
Here is an interesting take on why the kakoune approach may not be an improvement over vim. Definitely well thought out.

https://github.com/noctuid/dotfiles/blob/master/emacs/editin...

Re:Why Kakoune – The Quest For a Better Code Editor by davidatbu on Thursday June 22, 2023 @04:02AM (#36429259)
As a heavy user of neovim who's been curious about the "noun-verb" approach to modal editing, this link was an excellent read!
Re:Why Kakoune – The Quest For a Better Code Editor by nequo on Wednesday June 21, 2023 @07:38PM (#36426271)
Emacs has Meow which implements model editing with the Kakoune grammar:

https://github.com/meow-edit/meow

Re:Why Kakoune – The Quest For a Better Code Editor by 3oH2y869 on Wednesday June 21, 2023 @08:59PM (#36426828)
+1 for Meow. Vim doesn't make sense to me, but Meow does.
Re:Why Kakoune – The Quest For a Better Code Editor by cwp on Wednesday June 21, 2023 @07:52PM (#36426398)
I dig this too. It's what I loved about Quicksilver - it had simple grammar that went direct object, verb, (optionally) indirect object. That tied nicely into the plugin system, which gave it tremendous flexibility. Successors like Alfred, Google Bar and Raycast are trying to recreate the unix command line and it doesn't work nearly as well.
Re:Why Kakoune – The Quest For a Better Code Editor by girishso on Wednesday June 21, 2023 @10:13PM (#36427248)
Yes Quicksilver was very intuitive to work with, wonder why these new tools won't replicate the same behavior?
Re:Why Kakoune – The Quest For a Better Code Editor by Kinrany on Wednesday June 21, 2023 @10:56PM (#36427510)
What's Quicksilver?
Re:Why Kakoune – The Quest For a Better Code Editor by js2 on Thursday June 22, 2023 @01:12AM (#36428215)
Re:Why Kakoune – The Quest For a Better Code Editor by jacknews on Wednesday June 21, 2023 @08:02PM (#36426471)
You can get this to some extent with visual mode in (neo)vi(m).
Re:Why Kakoune – The Quest For a Better Code Editor by galkk on Wednesday June 21, 2023 @08:11PM (#36426526)
The point is not the immediate visual feedback, but change "direction". Delete 3 words is dw3 vs 3Wd.

To some extent this is similar to common SQL criticism of order of SELECT x FROM y, where some people say that FROM y SELECT y would be more clear.

Re:Why Kakoune – The Quest For a Better Code Editor by jacknews on Wednesday June 21, 2023 @08:38PM (#36426697)

  ctrl-v 3w d
  shift-v 3j y
  v ib c
etc
Re:Why Kakoune – The Quest For a Better Code Editor by cerved on Wednesday June 21, 2023 @11:28PM (#36427695)
don't you mean d3w?
Re:Why Kakoune – The Quest For a Better Code Editor by galkk on Thursday June 22, 2023 @03:16AM (#36428970)
You're right, typo :(
Re:Why Kakoune – The Quest For a Better Code Editor by jodrellblank on Thursday June 22, 2023 @08:35AM (#36431191)
People say this about data.method() vs function(data) and about PowerShell using Verb-Noun when they want Noun-Verb. It's pretty clearly either a personal preference, or a thing where different contexts read better one way or the other.

Why can't we make things which work either way?

Re:Why Kakoune – The Quest For a Better Code Editor by lenkite on Wednesday June 21, 2023 @11:32PM (#36427721)
After having tried both, I prefer verb-object for editing operations any day. Especially since its more natural to add a number for repeating. And its excellent for macros.
Re:Why Kakoune – The Quest For a Better Code Editor by srijan4 on Thursday June 22, 2023 @04:05AM (#36429276)
The first part of this https://karthinks.com/software/fifteen-ways-to-use-embark/ also talks about how inverting action and object can be useful, and how Emacs's embark package makes it possible to even go back and forth between object and action as needed.
Re:Why Kakoune – The Quest For a Better Code Editor by lumb63 on Thursday June 22, 2023 @06:18AM (#36430033)
There are a lot of operations in vim that I don’t need or want to see the selection. Sometimes it would be useful, and if I think so, I use visual mode instead.