VIM Modality interface implementation

199 Views Asked by At

I've been searching on google and here on SO for any hints or tips and tricks on implementing the vim like modality interface (the command and insert modes) and possible [demo] commands or keystrokes. Are there any libraries out there for this?

1

There are 1 best solutions below

0
On BEST ANSWER

No, I don't think so. Defining how the app responds to the keyboard is part of the application's core responsibilities.

Modality is a matter of how your app responds to keystrokes, it's not a magic ingredient that can be bolted on. Just have your app respond to keystrokes, and if you want a couple of keystrokes to switch between input and edit mode (or whatever), then define that functionality in your application, attach it to the key and optionally have your app update a status line or something indicating which mode it's currently in.