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