Skip to main content

hjkl_vim/
lib.rs

1pub mod cmd;
2pub mod pending;
3
4pub use cmd::EngineCmd;
5pub use pending::{Key, Outcome, PendingState, step};
6
7/// Mode discriminator for the hjkl editor stack.
8///
9/// Used as the mode parameter in `hjkl-keymap`'s generic `Keymap<A, M: Mode>`.
10/// Satisfies the `hjkl_keymap::Mode` trait via its blanket impl for any
11/// `Copy + Eq + Hash + Debug` type.
12///
13/// Phase 2+ will move the vim FSM itself here. For now this is pure plumbing:
14/// the enum lives in `hjkl-vim` so future FSM work has a stable home.
15#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
16pub enum Mode {
17    Normal,
18    Insert,
19    Visual,
20    VisualLine,
21    VisualBlock,
22    OpPending,
23    CommandLine,
24}