minivim
A tiny, plugin-driven Vim-like editor in Rust. Core behavior is implemented as plugins.
Run
cargo run -- path/to/file.txt
Modes
- Normal: move and issue commands
- Insert: type text
- Command: run ex-style commands
Keys
Normal mode:
hjklor arrows: move0/$: line start/endi: enter insert mode:: enter command modex: delete char under cursorEsc: return to normal mode
Insert mode:
- Type to insert
Enter: new lineBackspace: deleteTab: insert four spaces- Arrows: move
Esc: return to normal mode
Command mode:
:wwrite:w filenamewrite to a new file:qquit (fails if dirty):q!quit without saving:wqor:xwrite and quit
Plugins
Core structures live in src/editor.rs. Basic behavior is provided by plugins in
src/plugins.rs (modes, motion, editing, commands, rendering, syntect-based
syntax highlighting).
Development
- Enable the pre-commit hook:
./scripts/install-hooks.sh - Hook runs:
cargo clippy --all-targets -- -D warnings
Tests
- Run all tests:
cargo test - E2E tests run on Unix only (PTY-based).
Documentation
- Build local docs:
cargo doc --no-deps