pub enum EditCommand {
Show 55 variants MoveToStart, MoveToLineStart, MoveToEnd, MoveToLineEnd, MoveLeft, MoveRight, MoveWordLeft, MoveBigWordLeft, MoveWordRight, MoveWordRightStart, MoveBigWordRightStart, MoveWordRightEnd, MoveBigWordRightEnd, MoveToPosition(usize), InsertChar(char), InsertString(String), InsertNewline, ReplaceChar(char), ReplaceChars(usizeString), Backspace, Delete, CutChar, BackspaceWord, DeleteWord, Clear, ClearToLineEnd, CutCurrentLine, CutFromStart, CutFromLineStart, CutToEnd, CutToLineEnd, CutWordLeft, CutBigWordLeft, CutWordRight, CutBigWordRight, CutWordRightToNext, CutBigWordRightToNext, PasteCutBufferBefore, PasteCutBufferAfter, UppercaseWord, LowercaseWord, CapitalizeChar, SwitchcaseChar, SwapWords, SwapGraphemes, Undo, Redo, CutRightUntil(char), CutRightBefore(char), MoveRightUntil(char), MoveRightBefore(char), CutLeftUntil(char), CutLeftBefore(char), MoveLeftUntil(char), MoveLeftBefore(char),
}
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

MoveToLineStart

Move to the start of the current line

MoveToEnd

Move to the end of the buffer

MoveToLineEnd

Move to the end of the current line

MoveLeft

Move one character to the left

MoveRight

Move one character to the right

MoveWordLeft

Move one word to the left

MoveBigWordLeft

Move one WORD to the left

MoveWordRight

Move one word to the right

MoveWordRightStart

Move one word to the right, stop at start of word

MoveBigWordRightStart

Move one WORD to the right, stop at start of WORD

MoveWordRightEnd

Move one word to the right, stop at end of word

MoveBigWordRightEnd

Move one WORD to the right, stop at end of WORD

MoveToPosition(usize)

Move to position

InsertChar(char)

Insert a character at the current insertion point

InsertString(String)

Insert a string at the current insertion point

InsertNewline

Inserts the system specific new line character

  • On Unix systems LF ("\n")
  • On Windows CRLF ("\r\n")

ReplaceChar(char)

Replace a character

ReplaceChars(usizeString)

Replace characters with string

Backspace

Backspace delete from the current insertion point

Delete

Delete in-place from the current insertion point

CutChar

Cut the grapheme right 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

ClearToLineEnd

Clear to the end of the current line

CutCurrentLine

Cut the current line

CutFromStart

Cut from the start of the buffer to the insertion point

CutFromLineStart

Cut from the start of the current line to the insertion point

CutToEnd

Cut from the insertion point to the end of the buffer

CutToLineEnd

Cut from the insertion point to the end of the current line

CutWordLeft

Cut the word left of the insertion point

CutBigWordLeft

Cut the WORD left of the insertion point

CutWordRight

Cut the word right of the insertion point

CutBigWordRight

Cut the word right of the insertion point

CutWordRightToNext

Cut the word right of the insertion point and any following space

CutBigWordRightToNext

Cut the WORD right of the insertion point and any following space

PasteCutBufferBefore

Paste the cut buffer in front of the insertion point (Emacs, vi P)

PasteCutBufferAfter

Paste the cut buffer in front of the insertion point (vi p)

UppercaseWord

Upper case the current word

LowercaseWord

Lower case the current word

CapitalizeChar

Capitalize the current character

SwitchcaseChar

Switch the case of 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

CutRightUntil(char)

CutUntil right until char

CutRightBefore(char)

CutUntil right before char

MoveRightUntil(char)

CutUntil right until char

MoveRightBefore(char)

CutUntil right before char

CutLeftUntil(char)

CutUntil left until char

CutLeftBefore(char)

CutUntil left before char

MoveLeftUntil(char)

CutUntil left until char

MoveLeftBefore(char)

CutUntil left before char

Implementations

Determine if a certain operation should be undoable or if the operations should be coalesced for undoing

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

Formats the value using the given formatter. Read more

Converts to this type from the input type.

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

Converts the given value to a String. 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.