Struct modalkit::editing::context::EditContext
source · pub struct EditContext { /* private fields */ }
Expand description
Context for editing operations.
Implementations§
source§impl EditContext
impl EditContext
sourcepub fn get_cursor_end(&self) -> CursorEnd
pub fn get_cursor_end(&self) -> CursorEnd
Indicates where to leave the cursor after editing text.
sourcepub fn get_target_shape(&self) -> Option<TargetShape>
pub fn get_target_shape(&self) -> Option<TargetShape>
Indicates a shape to be applied to an EditAction.
sourcepub fn get_insert_style(&self) -> Option<InsertStyle>
pub fn get_insert_style(&self) -> Option<InsertStyle>
Indicates the style by which text should be inserted into the buffer.
sourcepub fn get_last_column(&self) -> bool
pub fn get_last_column(&self) -> bool
Indicates whether it is okay to move the cursor into the last column of a line.
sourcepub fn get_register(&self) -> Option<Register>
pub fn get_register(&self) -> Option<Register>
Indicates which register yanked and deleted text should go to.
sourcepub fn get_register_append(&self) -> bool
pub fn get_register_append(&self) -> bool
Indicates whether should be appended to the target register when yanking or deleting text.
sourcepub fn get_search_regex_dir(&self) -> MoveDir1D
pub fn get_search_regex_dir(&self) -> MoveDir1D
Get the direction in which to search.
sourcepub fn get_search_char(&self) -> Option<(MoveDir1D, bool, Char)>
pub fn get_search_char(&self) -> Option<(MoveDir1D, bool, Char)>
Returns a character to search for on the current line, and the direction in which to search.
sourcepub fn get_replace_char(&self) -> Option<Char>
pub fn get_replace_char(&self) -> Option<Char>
Returns a character to use when performing an EditAction::Replace operation.
sourcepub fn is_search_incremental(&self) -> bool
pub fn is_search_incremental(&self) -> bool
Whether to perform incremental searches while typing in the search bar.
Trait Implementations§
source§impl<K, A, S> BindingMachine<K, A, S, EditContext> for KeyManager<K, A, S>
impl<K, A, S> BindingMachine<K, A, S, EditContext> for KeyManager<K, A, S>
source§fn pop(&mut self) -> Option<(A, EditContext)>
fn pop(&mut self) -> Option<(A, EditContext)>
Fetch the next action produced by previously typed keys.
source§fn context(&mut self) -> EditContext
fn context(&mut self) -> EditContext
Get current output context after the most recent keypress.
source§fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
Returns the message to display for the current interactive dialog, if there is one. Read more
source§fn show_mode(&self) -> Option<String>
fn show_mode(&self) -> Option<String>
Returns a user-friendly string to display for the current mode.
source§fn get_cursor_indicator(&self) -> Option<char>
fn get_cursor_indicator(&self) -> Option<char>
Returns a character to show for the cursor.
source§fn repeat(&mut self, seq: S, other: Option<EditContext>)
fn repeat(&mut self, seq: S, other: Option<EditContext>)
Repeat a recent sequence of tracked actions, and optionally override their original
contexts using InputState::merge. The repeated sequence will be inserted at
the beginning of the action queue, before any other pending actions. Read more
source§fn run_dialog(&mut self, dialog: Box<dyn Dialog<A>>)
fn run_dialog(&mut self, dialog: Box<dyn Dialog<A>>)
Start an interactive user dialog.
source§impl<K, I> BindingMachine<K, Action<I>, RepeatType, EditContext> for MixedBindings<K, I>where
K: InputKey,
I: ApplicationInfo,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = EmacsState<I>>,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = VimState<I>>,
impl<K, I> BindingMachine<K, Action<I>, RepeatType, EditContext> for MixedBindings<K, I>where
K: InputKey,
I: ApplicationInfo,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = EmacsState<I>>,
InputStep<I>: Step<K, A = Action<I>, Sequence = RepeatType, State = VimState<I>>,
source§fn pop(&mut self) -> Option<(Action<I>, EditContext)>
fn pop(&mut self) -> Option<(Action<I>, EditContext)>
Fetch the next action produced by previously typed keys.
source§fn context(&mut self) -> EditContext
fn context(&mut self) -> EditContext
Get current output context after the most recent keypress.
source§fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
fn show_dialog(&mut self, max_rows: usize, max_cols: usize) -> Vec<Cow<'_, str>>
Returns the message to display for the current interactive dialog, if there is one. Read more
source§fn show_mode(&self) -> Option<String>
fn show_mode(&self) -> Option<String>
Returns a user-friendly string to display for the current mode.
source§fn get_cursor_indicator(&self) -> Option<char>
fn get_cursor_indicator(&self) -> Option<char>
Returns a character to show for the cursor.
source§fn repeat(&mut self, rt: RepeatType, other: Option<EditContext>)
fn repeat(&mut self, rt: RepeatType, other: Option<EditContext>)
Repeat a recent sequence of tracked actions, and optionally override their original
contexts using InputState::merge. The repeated sequence will be inserted at
the beginning of the action queue, before any other pending actions. Read more
source§impl Clone for EditContext
impl Clone for EditContext
source§fn clone(&self) -> EditContext
fn clone(&self) -> EditContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EditContext
impl Debug for EditContext
source§impl Default for EditContext
impl Default for EditContext
source§impl From<EditContext> for CommandContext
impl From<EditContext> for CommandContext
source§fn from(context: EditContext) -> Self
fn from(context: EditContext) -> Self
Converts to this type from the input type.
source§impl From<EditContext> for EditContextBuilder
impl From<EditContext> for EditContextBuilder
source§fn from(ctx: EditContext) -> Self
fn from(ctx: EditContext) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<EmacsState<I>> for EditContext
impl<I: ApplicationInfo> From<EmacsState<I>> for EditContext
source§fn from(ctx: EmacsState<I>) -> Self
fn from(ctx: EmacsState<I>) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> From<VimState<I>> for EditContext
impl<I: ApplicationInfo> From<VimState<I>> for EditContext
source§impl PartialEq for EditContext
impl PartialEq for EditContext
source§fn eq(&self, other: &EditContext) -> bool
fn eq(&self, other: &EditContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Resolve<Specifier<EditAction>, EditAction> for EditContext
impl Resolve<Specifier<EditAction>, EditAction> for EditContext
source§fn resolve(&self, mark: &Specifier<EditAction>) -> EditAction
fn resolve(&self, mark: &Specifier<EditAction>) -> EditAction
Use contextual information to convert a
T
into an R
.impl Eq for EditContext
impl StructuralPartialEq for EditContext
Auto Trait Implementations§
impl Freeze for EditContext
impl RefUnwindSafe for EditContext
impl Send for EditContext
impl Sync for EditContext
impl Unpin for EditContext
impl UnwindSafe for EditContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more