Enum reedline::EditCommand[][src]

pub enum EditCommand {
Show 24 variants MoveToStart, MoveToEnd, MoveLeft, MoveRight, MoveWordLeft, MoveWordRight, InsertChar(char), Backspace, Delete, BackspaceWord, DeleteWord, Clear, CutFromStart, CutToEnd, CutWordLeft, CutWordRight, PasteCutBuffer, UppercaseWord, LowercaseWord, CapitalizeChar, SwapWords, SwapGraphemes, Undo, Redo,
}
Expand description

Editing actions which can be mapped to key bindings.

Executed by Reedline::run_edit_commands()

Variants

MoveToStart

Move to the start of the buffer

MoveToEnd

Move to the end of the buffer

MoveLeft

Move one character to the left

MoveRight

Move one character to the right

MoveWordLeft

Move one word to the left

MoveWordRight

Move one word to the right

InsertChar(char)

Insert a character at the current insertion point

Tuple Fields of InsertChar

0: char
Backspace

Backspace delete from the current insertion point

Delete

Delete in-place from the current insertion point

BackspaceWord

Backspace delete a word from the current insertion point

DeleteWord

Delete in-place a word from the current insertion point

Clear

Clear the current buffer

CutFromStart

Cut from the start of the buffer to the insertion point

CutToEnd

Cut from the insertion point to the end of the buffer

CutWordLeft

Cut the word left of the insertion point

CutWordRight

Cut the word right of the insertion point

PasteCutBuffer

Paste the cut buffer at the insertion point

UppercaseWord

Upper case the current word

LowercaseWord

Lower case the current word

CapitalizeChar

Capitalize the current character

SwapWords

Swap the current word with the word to the right

SwapGraphemes

Swap the current grapheme/character with the one to the right

Undo

Undo the previous edit command

Redo

Redo an edit command from the undo history

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.