On Monday, February 24, 2014 9:13:34 AM UTC-6, Edward K. Ream wrote:
>
>
> The parser framework is complete. It is simpler and more flexible than I 
> had expected.  It is far simpler and more general than vim's own dispatch 
> code.
>

Some more details.

1. The main dispatcher, vc.do_key, first checks to see if another 
dispatcher or key handler has been queued.  If so, vc.do_key simply calls 
it.

This is a simple, flexible way to handle internal states such as visual 
mode, repeat counts and insert mode.  Dispatches use state-specifics 
dispatch dicts to call specific key/state handlers.

Handlers return None to end an internal state, or return another handler 
(often themselves) to continue an internal state.

2. Handlers (of whatever kind) are responsible for all other details.  This 
keeps vc.do_key and other dispatchers very simple.

3. I'm completely happy with removing the horrible old config code for vim 
mode.  It would have been a nightmare to explain or justify.  Instead, I'll 
create a simple vim_config plugin showing how to customize vim-mode code.

That's all there is too it.  Vim mode will be maximally flexible because it 
is maximally simple.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to