Skip to main content

hjkl_vim/
lib.rs

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