pub enum EngineCmd {
ReplaceChar {
ch: char,
count: usize,
},
FindChar {
ch: char,
forward: bool,
till: bool,
count: usize,
},
AfterGChord {
ch: char,
count: usize,
},
AfterZChord {
ch: char,
count: usize,
},
ApplyOpMotion {
op: OperatorKind,
motion_key: char,
total_count: usize,
},
ApplyOpDouble {
op: OperatorKind,
total_count: usize,
},
EnterOpTextObj {
op: OperatorKind,
count1: usize,
inner: bool,
},
EnterOpG {
op: OperatorKind,
count1: usize,
},
EnterOpFind {
op: OperatorKind,
count1: usize,
forward: bool,
till: bool,
},
}Expand description
Controller commands the host engine implements. hjkl-vim never mutates
the editor directly — it emits a command and the host (apps/hjkl) calls
the corresponding Editor method.
Variants§
ReplaceChar
FindChar
Emitted by PendingState::Find when the user completes f<x> / F<x>
/ t<x> / T<x>. The host calls Editor::find_char.
AfterGChord
Emitted by PendingState::AfterG when the user completes g<x>. The
host calls Editor::after_g(ch, count).
AfterZChord
Emitted by PendingState::AfterZ when the user completes z<x>. The
host calls Editor::after_z(ch, count).
ApplyOpMotion
d<motion> / y<motion> / c<motion> / ><motion> / <<motion> —
apply operator over a single-key motion. motion_key is the raw key
char (e.g. 'w', '$', 'G'). Engine parses via parse_motion and
applies. total_count = count1 * inner_count.
ApplyOpDouble
dd / yy / cc / >> / << — doubled-letter line op.
EnterOpTextObj
di / da — operator-pending text object entry. Engine sets
Pending::OpTextObj for the next bracket key. Sub-state lifts in 2c-iii.
EnterOpG
dg — operator-pending g-chord entry. Engine sets Pending::OpG.
Sub-state lifts in 2c-iv.
EnterOpFind
df / dF / dt / dT — operator-pending find entry. Engine sets
Pending::OpFind. Sub-state lifts in 2c-ii.