Re: [dev] [sandy] [PATCH] VIM key bindings.

From: Raphaël Proust <raphlalou_AT_gmail.com>
Date: Thu, 10 Jul 2014 10:52:06 +0100

On Thu, Jul 10, 2014 at 1:56 AM, Dimitris Zervas <dzervas_AT_dzervas.gr> wrote:
>>Also it would be nice if the actual text editing
>>component
>>would be clearly separated out, such that different editor frontends
>>can be implemented easily.
>
> Well, this is much easier implemented in OOP languages (which I don't love that much) but I don't know what would be the performance, complexity and code readability would be.
> I'll take a look, but no promises, as I love TUI (but I hate curses :P )

On the FP side there is Yi[0]

The trick that Yi uses is quite clever and not very complicated:
keyboard input is passed to a lexer/parser which can be rewritten to
provide alternative bindings. Treating keyboard events like that
actually makes a lot of sense. It is not very specific to any
programming paradigm and could be implemented in C (with a recursive
descent parser if yacc is deemed to suck to much).


[0] http://www.haskell.org/haskellwiki/Yi

Cheers,
-- 
______________
Raphaël Proust
Received on Thu Jul 10 2014 - 11:52:06 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 10 2014 - 12:00:15 CEST