pub enum InsertAt {
Caret,
FirstNonBlank,
AfterCaret,
LineEnd,
OpenBelow,
OpenAbove,
}Expand description
WHERE the caret lands when Insert mode is entered — vim’s insert-entry
family (i I a A o O) as ONE typed surface.
Until 2026-08-12 the family was a single key. i was bound straight to
Action::ChangeMode(Mode::Insert) and the other five did not exist —
pressing A in escriba 0.1.71 moved nothing, changed no mode, and reported
nothing, because an unbound Normal-mode key resolves to Action::Pending.
The absence was invisible from inside: escriba --keymap lists what IS
bound, so nothing named the four keys a vim user reaches for first.
Modelling the ENTRY POINT rather than the destination mode is what makes
that class of omission unrepresentable. A new entry is a variant here, and
Action::text_effect, Action::highlight_effect,
Action::edits_prompt and the runtime’s damage classifier are all total
over Action — so adding one cannot compile until every consequence has
been decided.
Variants§
Caret
i — insert BEFORE the caret. The caret does not move.
FirstNonBlank
I — the first non-blank character of the line.
AfterCaret
a — one column right of the caret (“append”), clamped to one past the
last character so a on the final character still appends.
LineEnd
A — one column past the last character of the line.
OpenBelow
o — open a fresh line BELOW the caret’s and land on it.
OpenAbove
O — open a fresh line ABOVE the caret’s and land on it.
Implementations§
Source§impl InsertAt
impl InsertAt
Sourcepub const fn opens_a_line(self) -> bool
pub const fn opens_a_line(self) -> bool
Does this entry ADD a line to the buffer?
o and O are the only two members of the family that change text;
the other four move the caret and nothing else. Read by
Action::text_effect, so the answer lives here beside the variants
rather than being re-derived by each classifier that needs it.
Trait Implementations§
impl Copy for InsertAt
Source§impl<'de> Deserialize<'de> for InsertAt
impl<'de> Deserialize<'de> for InsertAt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InsertAt
Source§impl JsonSchema for InsertAt
impl JsonSchema for InsertAt
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more