开发者

VIM Modality interface implementation

开发者 https://www.devze.com 2022-12-13 11:47 出处:网络
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] comma

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消