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