Skip to main content

EngineCmd

Enum EngineCmd 

Source
pub enum EngineCmd {
Show 15 variants 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, }, ApplyOpTextObj { op: OperatorKind, ch: char, inner: bool, total_count: usize, }, ApplyOpG { op: OperatorKind, ch: char, total_count: usize, }, ApplyOpFind { op: OperatorKind, ch: char, forward: bool, till: bool, total_count: usize, }, SetPendingRegister { reg: char, }, SetMark { ch: char, }, GotoMarkLine { ch: char, }, GotoMarkChar { ch: char, }, StartMacroRecord { reg: char, }, PlayMacro { reg: char, count: usize, },
}
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

Fields

§ch: char
§count: usize
§

FindChar

Emitted by PendingState::Find when the user completes f<x> / F<x> / t<x> / T<x>. The host calls Editor::find_char.

Fields

§ch: char
§forward: bool
§till: bool
§count: usize
§

AfterGChord

Emitted by PendingState::AfterG when the user completes g<x>. The host calls Editor::after_g(ch, count).

Fields

§ch: char
§count: usize
§

AfterZChord

Emitted by PendingState::AfterZ when the user completes z<x>. The host calls Editor::after_z(ch, count).

Fields

§ch: char
§count: usize
§

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.

Fields

§motion_key: char
§total_count: usize
§

ApplyOpDouble

dd / yy / cc / >> / << — doubled-letter line op.

Fields

§total_count: usize
§

ApplyOpTextObj

diw etc. — apply operator over text-object range. The reducer owns the i/a key via PendingState::OpTextObj; on the next char it emits this command. Host calls Editor::apply_op_text_obj.

Fields

§ch: char
§inner: bool
§total_count: usize
§

ApplyOpG

dgg etc. — apply operator over g-chord motion or case-op linewise form. The reducer owns the g key via PendingState::OpG; on the next char it emits this command. Host calls Editor::apply_op_g.

Fields

§ch: char
§total_count: usize
§

ApplyOpFind

df<x> / dF<x> / dt<x> / dT<x> — apply operator over find motion. Engine builds Motion::Find { ch, forward, till } and applies it. total_count is count1 * inner_count folded at transition time.

Replaces EnterOpFind (removed in 0.7.0). The reducer no longer sets engine Pending::OpFind; instead it transitions to PendingState::OpFind and emits this command on the next char.

Fields

§ch: char
§forward: bool
§till: bool
§total_count: usize
§

SetPendingRegister

"<reg> chord completion. Engine validates reg against [a-zA-Z0-9"+*_] and sets vim.pending_register if valid. Invalid chars are silently ignored (no-op), matching the engine FSM behaviour.

Fields

§reg: char
§

SetMark

m<ch> chord completion. Engine validates ch and records the mark at the current cursor position. Invalid chars are silently ignored (no-op).

Fields

§ch: char
§

GotoMarkLine

'<ch> chord completion. Engine validates ch and jumps to the mark linewise (row only, cursor lands on first non-blank column). Invalid or unset marks are silently ignored (no-op).

Fields

§ch: char
§

GotoMarkChar

`<ch> chord completion. Engine validates ch and jumps to the mark charwise (exact row + col). Invalid or unset marks are silently ignored (no-op).

Fields

§ch: char
§

StartMacroRecord

q{reg} chord completion. Host calls Editor::start_macro_record(reg) to begin capturing keystrokes into the named register. Invalid chars (non-alphabetic, non-digit) are silently ignored by the host.

Fields

§reg: char
§

PlayMacro

@{reg} / @@ chord completion. Host calls Editor::play_macro(reg, count) to obtain the decoded Input stream and re-feeds it through route_chord_key. reg == '@' means “repeat last macro” — the host resolves the actual register via Editor::play_macro’s internal logic.

Fields

§reg: char
§count: usize

Trait Implementations§

Source§

impl Clone for EngineCmd

Source§

fn clone(&self) -> EngineCmd

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EngineCmd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EngineCmd

Source§

impl PartialEq for EngineCmd

Source§

fn eq(&self, other: &EngineCmd) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EngineCmd

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more