Enum reedline::EditCommand
source · pub enum EditCommand {
Show 56 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,
Complete,
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
Complete
Insert completion: entire completion if there is only one possibility, or else up to shared prefix.
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§
source§impl EditCommand
impl EditCommand
Trait Implementations§
source§impl Clone for EditCommand
impl Clone for EditCommand
source§fn clone(&self) -> EditCommand
fn clone(&self) -> EditCommand
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EditCommand
impl Debug for EditCommand
source§impl<'de> Deserialize<'de> for EditCommand
impl<'de> Deserialize<'de> for EditCommand
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>,
source§impl Display for EditCommand
impl Display for EditCommand
source§impl IntoEnumIterator for EditCommand
impl IntoEnumIterator for EditCommand
source§impl PartialEq<EditCommand> for EditCommand
impl PartialEq<EditCommand> for EditCommand
source§fn eq(&self, other: &EditCommand) -> bool
fn eq(&self, other: &EditCommand) -> bool
self
and other
values to be equal, and is used
by ==
.