Enum reedline::EditCommand
source · [−]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(usize, String),
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(usize, String)
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
sourceimpl EditCommand
impl EditCommand
Trait Implementations
sourceimpl Clone for EditCommand
impl Clone for EditCommand
sourcefn clone(&self) -> EditCommand
fn clone(&self) -> EditCommand
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more