vim-navigator
Vim-style modal editing and navigation patterns for Ratatui TUIs.
Features
- Modal editing with Normal, Insert, and Command modes
- Vim keybindings (j/k, g/G, :commands, etc.)
- List navigation with automatic bounds checking
- Zero runtime dependencies beyond crossterm
Usage
Add to your Cargo.toml:
[]
= "0.1"
= "0.28"
Basic example:
use ;
use ;
Keybindings
Normal Mode
j/ Down - Move downk/ Up - Move upg- Jump to topG- Jump to bottom:- Enter command modei- Enter insert modeq- Quit (returns NavAction::Quit)
Command Mode
- Type commands after
: Enter- Execute commandEsc- Cancel and return to normal modeBackspace- Delete character
Insert Mode
Esc- Return to normal mode- All other keys return
NavAction::Nonefor app-specific handling
License
MIT OR Apache-2.0