API Reference
Complete API reference for every duck-vim module.
Complete API reference for every duck-vim module. Each module has a single responsibility and can be imported separately.
Modules
duck-vim is split into independent modules. Each module has a single responsibility and can be imported separately.
| Module | Import path | Description |
|---|---|---|
| Platform | @gentleduck/vim/platform | OS detection and Mod key resolution |
| Parser | @gentleduck/vim/parser | Parse, normalize, and validate key binding strings |
| Matcher | @gentleduck/vim/matcher | Match keyboard events against parsed bindings |
| Command | @gentleduck/vim/command | Registry and KeyHandler for managing shortcuts |
| Sequence | @gentleduck/vim/sequence | Multi-step sequence matching |
| Recorder | @gentleduck/vim/recorder | Record key combinations for settings UIs |
| Format | @gentleduck/vim/format | Format bindings for display |
| React | @gentleduck/vim/react | Provider, hooks, and context |
All modules except React are framework-agnostic and work in any browser environment.