Trait modalkit::actions::EditorActions

source ·
pub trait EditorActions<C, S, I>
where I: ApplicationInfo,
{ // Required methods fn edit( &mut self, action: &EditAction, target: &EditTarget, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn mark( &mut self, name: Mark, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn complete( &mut self, comptype: &CompletionType, selection: &CompletionSelection, display: &CompletionDisplay, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn insert_text( &mut self, act: &InsertTextAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn selection_command( &mut self, act: &SelectionAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn cursor_command( &mut self, act: &CursorAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; fn history_command( &mut self, act: &HistoryAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>; }
Expand description

An object capable of performing editing operations.

Required Methods§

source

fn edit( &mut self, action: &EditAction, target: &EditTarget, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Perform an editing operation over the targeted text.

source

fn mark( &mut self, name: Mark, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Create or update a cursor mark based on the leader’s cursor position.

source

fn complete( &mut self, comptype: &CompletionType, selection: &CompletionSelection, display: &CompletionDisplay, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Complete the text before the cursor group leader.

source

fn insert_text( &mut self, act: &InsertTextAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Insert text relative to the current cursor position.

source

fn selection_command( &mut self, act: &SelectionAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Modify the current selection.

source

fn cursor_command( &mut self, act: &CursorAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Perform an action over a cursor group.

source

fn history_command( &mut self, act: &HistoryAction, ctx: &C, store: &mut S ) -> EditResult<EditInfo, I>

Move to a different point in the buffer’s editing history.

Implementors§