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