pub enum EditorInput {
Motion(Motion),
Insert,
Append,
InsertLineStart,
AppendLineEnd,
OpenBelow,
OpenAbove,
Character(char),
Newline,
Backspace,
Delete,
Escape,
}Expand description
Framework-independent input accepted by EditableBuffer.
Variants§
Motion(Motion)
Apply a completed Vim motion in Normal mode; ignored in Insert mode.
Insert
Start insertion at the cursor (i).
Append
Start insertion after the cursor (a).
InsertLineStart
Start insertion at the first non-blank byte (I).
AppendLineEnd
Start insertion after the line (A).
OpenBelow
Open a new line below and enter Insert mode (o).
OpenAbove
Open a new line above and enter Insert mode (O).
Character(char)
Insert one non-line-separator Unicode scalar value while in Insert mode.
Use EditorInput::Newline for \n or \r input. The byte limit is
charged by char::len_utf8, not by character or display width.
Newline
Split the current line while in Insert mode, charging one separator byte.
Backspace
Delete the preceding scalar value, joining lines at column zero.
At the start of the first line this is ignored.
Delete
Delete the next scalar value, joining with the next line at line end.
At the end of the final line this is ignored.
Escape
Leave Insert mode while preserving content, or do nothing in Normal mode.
On a non-empty line, leaving Insert moves the insertion-point cursor one Unicode scalar left to satisfy the Normal-mode cursor invariant.