Skip to main content

install

Function install 

Source
pub fn install<H: Host>(ed: &mut Editor<View, H>)
Expand description

Install the vim discipline on ed, replacing whatever was there.

Editor::new leaves the discipline slot at NoDiscipline — the engine cannot name a concrete discipline. Every editor that should interpret keys as vim must be handed to this once at construction; vim_editor does both in one call.

Dispatching vim input at an editor that skipped this panics on the first state access (see hjkl_vim::vim_state) rather than silently behaving like a keyboard-less buffer.