On Fri, Sep 19, 2014 at 2:22 PM, Maxime Coste <frrr...@gmail.com> wrote: > […] > That was one of the motivations for swapping selection and operation order in > Kakoune (haters gonna hate...), by decoupling selections from the operator, > you > can express arbitrarily complex selection operations, you have a (rather > limited) > version of that with vim visual mode. > > Once you have that, you can provide the upper level operations by defining > them > by language in term of basic operations.
>From what I understand of Kakoune (correct me if I'm wrong) the selection system is a dynamic/interactive equivalent to the structural regular expressions of sam/Acme. 1: Can you comment on the difference in expressiveness? (Assuming you tested Acme/sam, otherwise don't bother.) 2: Does Kakoune have selection macro? I.e., a way to repeat the same selection keystroke input. Or even better a way to go and edit the selection pattern like q: does for commands in vim. That would actually allow to define higher level constructs and reuse them across projects of the same language, &c. > The problem with parsers is that besides being quite slow if data driven, they > are not very good at analysing invalid code, which is the most common state of > code being edited. Actually, modern parsers can deal with that. They have failure modes that allow restarting after a parse failure (i.e., parse the next code block even if the current one is invalid). Incremental parsing also helps with speed. Cheers, -- ______________ Raphaël Proust