On Thursday, February 20, 2014 6:12:36 AM UTC-6, Edward K. Ream wrote:

> The vim project's key parsing and dispatching mechanism looks like 
overkill, but it works and there is no reason to not have the flexibility 
to define any key bindings anyone could want.

On second thought, all the complex parsing of user settings was are really 
bad idea.  A recent rev now uses the standard vim bindings "baked into" 
vc.dispatch_dict.  This is the simplest thing that could possibly work, and 
removes lots of unbearably-complex code. vc.doKey must now handle all the 
various complications related to visual mode, repeat counts and such, but 
imo this is again much simpler than any other way.  If more flexibility is 
wanted later (very unlikely, imo), plugins could patch vc.dispatch_dict 
and/or vc.doKey.

The interface to the vimCommands class is now simpler as well.  
k.masterKeyHandler calls vc.doKey as needed, and returns only if vc.doKey 
claims to have handled the key event.  This allows all of Leo's other 
key-related machinery to work unchanged.

In short, it should now be straightforward to develop vim-only commands.

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