Skip to main content

VimEditorExt

Trait VimEditorExt 

Source
pub trait VimEditorExt {
Show 200 methods // Required methods fn visual_block_bounds(&self) -> (usize, usize, usize, usize); fn block_highlight(&self) -> Option<(usize, usize, usize, usize)>; fn char_highlight(&self) -> Option<((usize, usize), (usize, usize))>; fn visual_char_range_exclusive( &self, ) -> Option<((usize, usize), (usize, usize))>; fn line_highlight(&self) -> Option<(usize, usize)>; fn buffer_selection(&self) -> Option<Selection>; fn selection_highlight(&self) -> Option<Highlight>; fn text_object_inner_word(&self) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_word( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_big_word( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_big_word( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_sentence( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_sentence( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>; fn text_object_inner_tag(&self) -> Option<((usize, usize), (usize, usize))>; fn text_object_around_tag(&self) -> Option<((usize, usize), (usize, usize))>; fn delete_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, ); fn yank_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, ); fn change_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, ); fn indent_range( &mut self, start: (usize, usize), end: (usize, usize), count: i32, shiftwidth: u32, ); fn case_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, op: Operator, ); fn delete_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, ); fn yank_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, ); fn change_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, ); fn indent_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, count: i32, ); fn auto_indent_range(&mut self, start: (usize, usize), end: (usize, usize)); fn paste_after(&mut self, count: usize); fn paste_before(&mut self, count: usize); fn paste_cursor_after(&mut self, before: bool, count: usize); fn paste_reindent(&mut self, before: bool, count: usize); fn visual_paste(&mut self, before: bool); fn adjust_number_visual(&mut self, delta: i64, sequential: bool); fn ampersand_repeat(&mut self); fn visual_join(&mut self, with_space: bool); fn goto_percent(&mut self, count: usize); fn jump_back(&mut self, count: usize); fn jump_forward(&mut self, count: usize); fn search_repeat(&mut self, forward: bool, count: usize); fn word_search(&mut self, forward: bool, whole_word: bool, count: usize); fn replace_char_at(&mut self, ch: char, count: usize); fn find_char(&mut self, ch: char, forward: bool, till: bool, count: usize); fn after_g(&mut self, ch: char, count: usize); fn after_z(&mut self, ch: char, count: usize); fn apply_op_motion( &mut self, op: Operator, motion_key: char, total_count: usize, ); fn apply_op_double(&mut self, op: Operator, total_count: usize); fn apply_op_find( &mut self, op: Operator, ch: char, forward: bool, till: bool, count: usize, ); fn apply_op_text_obj( &mut self, op: Operator, ch: char, inner: bool, total_count: usize, ); fn apply_op_g(&mut self, op: Operator, ch: char, total_count: usize); fn vim_mode(&self) -> VimMode; fn enter_visual_char(&mut self); fn enter_visual_line(&mut self); fn enter_visual_block(&mut self); fn exit_visual_to_normal(&mut self); fn visual_o_toggle(&mut self); fn reenter_last_visual(&mut self); fn set_mode(&mut self, mode: VimMode); fn visual_anchor(&self) -> (usize, usize); fn set_visual_anchor(&mut self, anchor: (usize, usize)); fn visual_line_anchor(&self) -> usize; fn set_visual_line_anchor(&mut self, row: usize); fn block_anchor(&self) -> (usize, usize); fn set_block_anchor(&mut self, anchor: (usize, usize)); fn block_vcol(&self) -> usize; fn set_block_vcol(&mut self, vcol: usize); fn block_to_eol(&self) -> bool; fn set_block_to_eol(&mut self, to_eol: bool); fn set_pending_register_raw(&mut self, reg: Option<char>); fn take_pending_register_raw(&mut self) -> Option<char>; fn recording_macro(&self) -> Option<char>; fn set_recording_macro(&mut self, reg: Option<char>); fn push_recording_key(&mut self, input: Input); fn take_recording_keys(&mut self) -> Vec<Input>; fn set_recording_keys(&mut self, keys: Vec<Input>); fn recording_keys_len(&self) -> usize; fn is_replaying_macro_raw(&self) -> bool; fn set_replaying_macro_raw(&mut self, v: bool); fn last_macro(&self) -> Option<char>; fn set_last_macro(&mut self, reg: Option<char>); fn last_insert_pos(&self) -> Option<(usize, usize)>; fn set_last_insert_pos(&mut self, pos: Option<(usize, usize)>); fn last_visual(&self) -> Option<LastVisual>; fn set_last_visual(&mut self, snap: Option<LastVisual>); fn insert_pending_register(&self) -> bool; fn set_insert_pending_register(&mut self, v: bool); fn change_mark_start(&self) -> Option<(usize, usize)>; fn take_change_mark_start(&mut self) -> Option<(usize, usize)>; fn set_change_mark_start(&mut self, pos: Option<(usize, usize)>); fn is_visual(&self) -> bool; fn apply_op_with_motion_direct( &mut self, op: Operator, motion: &Motion, count: usize, ); fn adjust_number(&mut self, delta: i64); fn enter_search(&mut self, forward: bool); fn enter_search_op(&mut self, forward: bool, op: Operator, count: usize); fn apply_op_search_range(&mut self, op: Operator, origin: (usize, usize)); fn visual_block_insert_at_left( &mut self, top: usize, bot: usize, col: usize, count: usize, ); fn visual_block_append_at_right( &mut self, top: usize, bot: usize, col: usize, left: usize, count: usize, ); fn execute_motion(&mut self, motion: Motion, count: usize); fn update_block_vcol(&mut self, motion: &Motion); fn apply_visual_operator(&mut self, op: Operator, count: usize); fn replace_block_char(&mut self, ch: char); fn visual_replace_char(&mut self, ch: char); fn visual_text_obj_extend(&mut self, ch: char, inner: bool); fn insert_char(&mut self, ch: char); fn insert_newline(&mut self); fn insert_tab(&mut self); fn insert_backspace(&mut self); fn insert_delete(&mut self); fn insert_arrow(&mut self, dir: InsertDir); fn insert_home(&mut self); fn insert_end(&mut self); fn insert_pageup(&mut self, viewport_h: u16); fn insert_pagedown(&mut self, viewport_h: u16); fn insert_ctrl_w(&mut self); fn insert_ctrl_u(&mut self); fn insert_ctrl_h(&mut self); fn insert_ctrl_o_arm(&mut self); fn insert_ctrl_r_arm(&mut self); fn insert_ctrl_t(&mut self); fn insert_ctrl_d(&mut self); fn insert_ctrl_a(&mut self); fn insert_ctrl_e(&mut self); fn insert_ctrl_y(&mut self); fn insert_paste_register(&mut self, reg: char); fn insert_ctrl_bracket(&mut self); fn leave_insert_to_normal(&mut self); fn enter_insert_i(&mut self, count: usize); fn enter_insert_shift_i(&mut self, count: usize); fn enter_insert_a(&mut self, count: usize); fn enter_insert_shift_a(&mut self, count: usize); fn open_line_below(&mut self, count: usize); fn open_line_above(&mut self, count: usize); fn enter_replace_mode(&mut self, count: usize); fn delete_char_forward(&mut self, count: usize); fn delete_char_backward(&mut self, count: usize); fn substitute_char(&mut self, count: usize); fn substitute_line(&mut self, count: usize); fn delete_to_eol(&mut self, count: usize); fn change_to_eol(&mut self, count: usize); fn yank_to_eol(&mut self, count: usize); fn join_line(&mut self, count: usize); fn toggle_case_at_cursor(&mut self, count: usize); fn replay_last_change(&mut self, count: usize); fn set_mark_at_cursor(&mut self, ch: char); fn goto_mark_line(&mut self, ch: char); fn goto_mark_char(&mut self, ch: char); fn try_goto_mark_line(&mut self, ch: char) -> MarkJump; fn try_goto_mark_char(&mut self, ch: char) -> MarkJump; fn pending(&self) -> Pending; fn set_pending(&mut self, p: Pending); fn take_pending(&mut self) -> Pending; fn count(&self) -> usize; fn set_count(&mut self, c: usize); fn accumulate_count_digit(&mut self, digit: usize); fn reset_count(&mut self); fn take_count(&mut self) -> usize; fn fsm_mode(&self) -> Mode; fn set_fsm_mode(&mut self, m: Mode); fn is_replaying(&self) -> bool; fn set_replaying(&mut self, v: bool); fn is_one_shot_normal(&self) -> bool; fn set_one_shot_normal(&mut self, v: bool); fn last_find(&self) -> Option<(char, bool, bool)>; fn set_last_find(&mut self, target: Option<(char, bool, bool)>); fn sneak(&mut self, c1: char, c2: char, forward: bool, count: usize); fn apply_op_sneak( &mut self, op: Operator, c1: char, c2: char, forward: bool, total_count: usize, ); fn last_sneak(&self) -> Option<((char, char), bool)>; fn last_change(&self) -> Option<LastChange>; fn set_last_change(&mut self, lc: Option<LastChange>); fn last_change_mut(&mut self) -> Option<&mut LastChange>; fn insert_session(&self) -> Option<&InsertSession>; fn insert_session_mut(&mut self) -> Option<&mut InsertSession>; fn take_insert_session(&mut self) -> Option<InsertSession>; fn set_insert_session(&mut self, s: Option<InsertSession>); fn pending_register(&self) -> Option<char>; fn pending_register_is_clipboard(&self) -> bool; fn recording_register(&self) -> Option<char>; fn pending_count(&self) -> Option<u32>; fn pending_op(&self) -> Option<char>; fn is_chord_pending(&self) -> bool; fn is_insert_register_pending(&self) -> bool; fn clear_insert_register_pending(&mut self); fn set_pending_register(&mut self, reg: char); fn start_macro_record(&mut self, reg: char); fn stop_macro_record(&mut self); fn is_recording_macro(&self) -> bool; fn is_replaying_macro(&self) -> bool; fn play_macro(&mut self, reg: char) -> Vec<Input>; fn end_macro_replay(&mut self); fn record_input(&mut self, input: Input); fn force_normal(&mut self); fn mouse_click_doc(&mut self, row: usize, col: usize); fn mouse_begin_drag(&mut self); fn range_for_op_motion( &mut self, motion_key: char, total_count: usize, ) -> Option<(usize, usize)>; fn apply_motion(&mut self, kind: MotionKind, count: usize); fn range_for_op_g( &mut self, ch: char, total_count: usize, ) -> Option<(usize, usize)>; fn range_for_op_text_obj( &self, ch: char, inner: bool, total_count: usize, ) -> Option<(usize, usize)>;
}
Expand description

Vim-discipline read accessors layered onto every Editor<View, H>.

Blanket-implemented below; bring it into scope with use hjkl_vim::VimEditorExt to call these on an Editor.

Required Methods§

Source

fn visual_block_bounds(&self) -> (usize, usize, usize, usize)

VisualBlock selection bounds as (top, bot, left, right) — inclusive rows and inclusive columns, derived from the block anchor and the cursor’s sticky column. Meaningful only while in VisualBlock mode; callers that need the “are we in block mode?” guard use VimEditorExt::block_highlight instead.

Source

fn block_highlight(&self) -> Option<(usize, usize, usize, usize)>

The VisualBlock highlight rectangle (top, bot, left, right), or None when the editor is not in VisualBlock mode.

Source

fn char_highlight(&self) -> Option<((usize, usize), (usize, usize))>

Start/end (row, col) of the active char-wise Visual selection, positionally ordered. None when not in Visual mode.

When [hjkl_engine::editor::Settings::selection_exclusive] is false (default, vim behaviour): both endpoints are inclusive — the cells at start and end are both selected.

When it is true (VSCode bar-cursor behaviour): the range is half-openstart is included but end is the first cell that is NOT selected (the caret sits before it). If the selection is empty (anchor == cursor) None is returned so callers do not need to check for zero-length ranges.

Source

fn visual_char_range_exclusive( &self, ) -> Option<((usize, usize), (usize, usize))>

Return the half-open exclusive char-visual range (start, end) where end is the first cell NOT selected (the caret position). None when not in Visual mode or the selection is empty.

Convenience accessor for the VSCode dispatcher; avoids duplicating the anchor/cursor ordering logic at the call site.

Source

fn line_highlight(&self) -> Option<(usize, usize)>

Top/bottom rows of the active VisualLine selection (inclusive). None when we’re not in VisualLine mode.

Source

fn buffer_selection(&self) -> Option<Selection>

Active selection in hjkl_buffer::Selection shape. None when not in a Visual mode. The host hands this straight to BufferView.

Source

fn selection_highlight(&self) -> Option<Highlight>

Active visual selection as a SPEC Highlight with HighlightKind::Selection.

Returns None when the editor isn’t in a Visual mode. Visual-line and visual-block selections collapse to the bounding char range of the selection — the SPEC Selection kind doesn’t carry sub-line info today; hosts that need full line / block geometry continue to read VimEditorExt::buffer_selection (the legacy hjkl_buffer::Selection shape).

Source

fn text_object_inner_word(&self) -> Option<((usize, usize), (usize, usize))>

Resolve the range of iw (inner word) at the cursor.

An inner word is the contiguous run of keyword characters (or punctuation characters if the cursor is on punctuation) under the cursor, without surrounding whitespace. Whitespace-only positions return None.

Source

fn text_object_around_word(&self) -> Option<((usize, usize), (usize, usize))>

Resolve the range of aw (around word) at the cursor.

Like iw but extends the range to include trailing whitespace after the word. If no trailing whitespace exists, leading whitespace before the word is absorbed instead (vim :help text-objects behaviour).

Source

fn text_object_inner_big_word(&self) -> Option<((usize, usize), (usize, usize))>

Resolve the range of iW (inner WORD) at the cursor.

A WORD is any contiguous run of non-whitespace characters — punctuation is not a word boundary.

Source

fn text_object_around_big_word( &self, ) -> Option<((usize, usize), (usize, usize))>

Resolve the range of aW (around WORD) at the cursor.

Source

fn text_object_inner_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>

Resolve the range of i<quote> (inner quote) at the cursor.

Excludes the quote characters themselves. None when the cursor’s line contains fewer than two occurrences of quote, or no matching pair can be found around or ahead of the cursor.

Source

fn text_object_around_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>

Resolve the range of a<quote> (around quote) at the cursor.

Like i<quote> but includes the quote characters plus surrounding whitespace on one side: trailing after the closing quote if any exists, otherwise leading before the opening quote.

Source

fn text_object_inner_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>

Resolve the range of i<bracket> (inner bracket pair) at the cursor.

The cursor may be anywhere inside the pair or on a bracket character. When not inside any pair the resolver falls back to a forward scan (targets.vim-style: ci( works when the cursor is before (). Multi-line pairs are supported.

Source

fn text_object_around_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>

Resolve the range of a<bracket> (around bracket pair) at the cursor.

Like i<bracket> but includes the bracket characters themselves.

Source

fn text_object_inner_sentence(&self) -> Option<((usize, usize), (usize, usize))>

Resolve is (inner sentence) at the cursor.

Excludes trailing whitespace. Sentence boundaries follow vim’s is semantics (period / ? / ! followed by whitespace or end-of-paragraph).

Source

fn text_object_around_sentence( &self, ) -> Option<((usize, usize), (usize, usize))>

Resolve as (around sentence) at the cursor.

Like is but includes trailing whitespace after the terminator.

Source

fn text_object_inner_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>

Resolve ip (inner paragraph) at the cursor.

A paragraph is a block of non-blank lines bounded by blank lines or buffer edges. None when the cursor is on a blank line.

Source

fn text_object_around_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>

Resolve ap (around paragraph) at the cursor.

Like ip but includes one trailing blank line when present.

Source

fn text_object_inner_tag(&self) -> Option<((usize, usize), (usize, usize))>

Resolve it (inner tag) at the cursor.

Matches XML/HTML-style <tag>...</tag> pairs, returning the content between the open and close tags (excluding the tags themselves).

Source

fn text_object_around_tag(&self) -> Option<((usize, usize), (usize, usize))>

Resolve at (around tag) at the cursor.

Like it but includes the open and close tag delimiters.

Source

fn delete_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Delete the region [start, end) and stash the removed text in register. '"' selects the unnamed register (vim default); 'a''z' select named registers.

Source

fn yank_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Yank (copy) the region [start, end) into register without mutating the buffer. '"' selects the unnamed register; '0' the yank-only register; 'a''z' select named registers.

Source

fn change_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Delete the region [start, end) and transition to Insert mode (vim c operator). The deleted text is stashed in register. On return the editor is in Insert mode; the caller must not issue further normal-mode ops until the insert session ends.

Source

fn indent_range( &mut self, start: (usize, usize), end: (usize, usize), count: i32, shiftwidth: u32, )

Indent (count > 0) or outdent (count < 0) the row span [start.0, end.0]. Column components are ignored — indent is always linewise. shiftwidth overrides the editor’s configured shiftwidth for this call; pass 0 to use the current editor setting. count == 0 is a no-op.

Source

fn case_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, op: Operator, )

Apply a case transformation (Operator::Uppercase / Operator::Lowercase / Operator::ToggleCase) to the region [start, end). Other Operator variants are silently ignored (no-op). Registers are left untouched — vim’s case operators do not write to registers.

Source

fn delete_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Delete a rectangular VisualBlock selection.

Source

fn yank_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Yank a rectangular VisualBlock selection into register without mutating the buffer.

Source

fn change_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Delete a rectangular VisualBlock selection and enter Insert mode (c operator). Mode is Insert on return.

Source

fn indent_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, count: i32, )

Indent (count > 0) or outdent (count < 0) rows top_row..=bot_row. Column bounds are ignored — vim’s block indent is always linewise. count == 0 is a no-op.

Source

fn auto_indent_range(&mut self, start: (usize, usize), end: (usize, usize))

Auto-indent (v1 dumb shiftwidth) the row span [start.0, end.0]. Column components are ignored — auto-indent is always linewise.

The algorithm is a naive bracket-depth counter: it scans the buffer from row 0 to compute the correct depth at start.0, then for each line in the target range strips existing leading whitespace and prepends depth × indent_unit. Lines whose first non-whitespace character is a close bracket get one fewer indent level. Empty / whitespace-only lines are cleared. After the operation the cursor lands on the first non-whitespace character of start_row (vim parity ==).

v1 limitation: the bracket scan does not detect brackets inside string literals or comments.

Source

fn paste_after(&mut self, count: usize)

p — paste the unnamed register (or the register selected via "r) after the cursor. Linewise content opens a new line below; charwise content is inserted inline. Records Paste { before: false } for ..

Source

fn paste_before(&mut self, count: usize)

P — paste the unnamed register (or the "r register) before the cursor. Linewise content opens a new line above; charwise is inline. Records Paste { before: true } for dot-repeat.

Source

fn paste_cursor_after(&mut self, before: bool, count: usize)

gp / gP — paste like p/P but leave the cursor just after the pasted text. before = true for gP.

Source

fn paste_reindent(&mut self, before: bool, count: usize)

]p / [p — linewise paste with the pasted block reindented to match the current line. before = true for [p.

Source

fn visual_paste(&mut self, before: bool)

Visual-mode p / P — replace the active selection with the register. before = true for P (preserves the source register).

Source

fn adjust_number_visual(&mut self, delta: i64, sequential: bool)

Visual-mode <C-a>/<C-x> (uniform) and g<C-a>/g<C-x> (sequential) — adjust the first number on each selected line.

Source

fn ampersand_repeat(&mut self)

Normal-mode & — repeat the last :s on the current line (no flags).

Source

fn visual_join(&mut self, with_space: bool)

Visual-mode J (with_space = true) / gJ (false) — join the selected lines into one.

Source

fn goto_percent(&mut self, count: usize)

[count]% — jump to the line at count percent of the file.

Source

fn jump_back(&mut self, count: usize)

<C-o> — jump back count entries in the jumplist, saving the current position on the forward stack so <C-i> can return.

Source

fn jump_forward(&mut self, count: usize)

<C-i> / Tab — redo count entries on the forward jumplist stack, saving the current position on the backward stack.

Source

fn search_repeat(&mut self, forward: bool, count: usize)

n — repeat the last / or ? search count times in its original direction. forward = true keeps the direction; false inverts (N).

* / # / g* / g# — search for the word under the cursor. forward chooses direction; whole_word wraps the pattern in \b anchors (true for * / #, false for g* / g#). count repeats.

Source

fn replace_char_at(&mut self, ch: char, count: usize)

r<x> — replace the char under the cursor with ch, count times. Cursor ends on the last replaced char; one undo snapshot at start.

Source

fn find_char(&mut self, ch: char, forward: bool, till: bool, count: usize)

f/F/t/T — find ch on the current line. forward chooses direction, till stops one char short. Records last_find for ;/,.

Source

fn after_g(&mut self, ch: char, count: usize)

Apply the g-chord effect for g<ch> with a pre-captured count.

Source

fn after_z(&mut self, ch: char, count: usize)

Apply the z-chord effect for z<ch> with a pre-captured countzz/zt/zb (scroll-cursor), the fold ops, and zf.

Source

fn apply_op_motion( &mut self, op: Operator, motion_key: char, total_count: usize, )

Apply an operator over a single-key motion (e.g. dw, d$, dG). The engine resolves motion_key to a Motion via parse_motion. total_count is the folded product of prefix and inner counts. No-op when motion_key is not a known motion (vim cancels the operator).

Source

fn apply_op_double(&mut self, op: Operator, total_count: usize)

Apply a doubled-letter line op (dd / yy / cc / >> / <<).

Source

fn apply_op_find( &mut self, op: Operator, ch: char, forward: bool, till: bool, count: usize, )

Apply an operator over a find motion (df<x> / dF<x> / dt<x> / dT<x>). Records last_find for ; / , repeat and updates last_change when op is Change (dot-repeat).

Source

fn apply_op_text_obj( &mut self, op: Operator, ch: char, inner: bool, total_count: usize, )

Apply an operator over a text-object range (diw / daw / di" …). Unknown ch values are silently ignored, matching the FSM.

Source

fn apply_op_g(&mut self, op: Operator, ch: char, total_count: usize)

Apply an operator over a g-chord motion or case-op linewise form (dgg / dge / dgE / dgj / dgk / gUgU …).

Source

fn vim_mode(&self) -> VimMode

The current vim mode (Normal / Insert / Visual / VisualLine / VisualBlock).

Source

fn enter_visual_char(&mut self)

v from Normal — enter charwise Visual mode, anchoring the selection at the current cursor position.

Source

fn enter_visual_line(&mut self)

V from Normal — enter linewise Visual mode, anchoring on the current line. Motions extend the selection by whole lines.

Source

fn enter_visual_block(&mut self)

<C-v> from Normal — enter Visual-block mode. The selection is a rectangle whose corners are the anchor and the live cursor.

Source

fn exit_visual_to_normal(&mut self)

Esc from any visual mode — set < / > marks, stash the selection for gv re-entry, then return to Normal mode.

Source

fn visual_o_toggle(&mut self)

o in Visual / VisualLine / VisualBlock — swap the cursor and anchor so the user can extend the other end of the selection. Does NOT mutate the selection range; only the active endpoint changes.

Source

fn reenter_last_visual(&mut self)

gv — restore the last visual selection (mode + anchor + cursor position). No-op when no visual selection has been exited yet.

Source

fn set_mode(&mut self, mode: VimMode)

Direct mode-transition entry point. Sets both the internal FSM mode and the stable current_mode field read by vim_mode().

Prefer the semantic primitives (enter_visual_char, enter_insert_i, …) which also set up required bookkeeping (anchors, sessions, …). Use set_mode only when you need a raw mode flip without side-effects.

Source

fn visual_anchor(&self) -> (usize, usize)

The charwise Visual-mode anchor (row, col).

Source

fn set_visual_anchor(&mut self, anchor: (usize, usize))

Set the charwise Visual-mode anchor.

Source

fn visual_line_anchor(&self) -> usize

The linewise Visual-mode anchor row.

Source

fn set_visual_line_anchor(&mut self, row: usize)

Set the linewise Visual-mode anchor row.

Source

fn block_anchor(&self) -> (usize, usize)

The VisualBlock anchor (row, col).

Source

fn set_block_anchor(&mut self, anchor: (usize, usize))

Set the VisualBlock anchor.

Source

fn block_vcol(&self) -> usize

The VisualBlock sticky (virtual) column.

Source

fn set_block_vcol(&mut self, vcol: usize)

Set the VisualBlock sticky (virtual) column.

Source

fn block_to_eol(&self) -> bool

Whether the VisualBlock selection is “ragged” ($ was pressed — :h v_b_$): every row resolves its own right edge to its own EOL instead of the block’s fixed right column.

Source

fn set_block_to_eol(&mut self, to_eol: bool)

Set the VisualBlock ragged ($) flag.

Source

fn set_pending_register_raw(&mut self, reg: Option<char>)

Set the pending "r register selector without consuming it.

Source

fn take_pending_register_raw(&mut self) -> Option<char>

Take (and clear) the pending "r register selector.

Source

fn recording_macro(&self) -> Option<char>

Register currently being recorded into via q{reg}, if any.

Source

fn set_recording_macro(&mut self, reg: Option<char>)

Set (or clear) the register being recorded into.

Source

fn push_recording_key(&mut self, input: Input)

Append an input to the in-flight macro recording.

Source

fn take_recording_keys(&mut self) -> Vec<Input>

Take (and clear) the recorded macro keys.

Source

fn set_recording_keys(&mut self, keys: Vec<Input>)

Replace the recorded macro keys wholesale.

Source

fn recording_keys_len(&self) -> usize

Number of keys recorded so far.

Source

fn is_replaying_macro_raw(&self) -> bool

Whether a macro is currently being replayed.

Source

fn set_replaying_macro_raw(&mut self, v: bool)

Set the macro-replay flag.

Source

fn last_macro(&self) -> Option<char>

The last macro register played, for @@.

Source

fn set_last_macro(&mut self, reg: Option<char>)

Set the last macro register played.

Source

fn last_insert_pos(&self) -> Option<(usize, usize)>

Position where the last insert session ended (gi).

Source

fn set_last_insert_pos(&mut self, pos: Option<(usize, usize)>)

Set the last insert-session end position.

Source

fn last_visual(&self) -> Option<LastVisual>

Snapshot of the last visual selection, for gv.

Source

fn set_last_visual(&mut self, snap: Option<LastVisual>)

Set the last-visual snapshot.

Source

fn insert_pending_register(&self) -> bool

Whether Ctrl-R is armed and awaiting a register name.

Source

fn set_insert_pending_register(&mut self, v: bool)

Set the Ctrl-R pending-register flag.

Source

fn change_mark_start(&self) -> Option<(usize, usize)>

The stashed [ mark start for a Change operation, or None.

Source

fn take_change_mark_start(&mut self) -> Option<(usize, usize)>

Take (and clear) the stashed [ mark start.

Source

fn set_change_mark_start(&mut self, pos: Option<(usize, usize)>)

Set the stashed [ mark start.

Source

fn is_visual(&self) -> bool

true when the editor is in any visual mode (Visual / VisualLine / VisualBlock).

Source

fn apply_op_with_motion_direct( &mut self, op: Operator, motion: &Motion, count: usize, )

Apply op over motion with count repetitions, taking the full vim-quirks path (operator context for l, clamping, etc.).

Source

fn adjust_number(&mut self, delta: i64)

Ctrl-a / Ctrl-x — adjust the number under or after the cursor. delta = 1 increments, -1 decrements; larger deltas multiply as in vim’s 5<C-a>.

Open the / or ? search prompt. forward = true for /.

Source

fn enter_search_op(&mut self, forward: bool, op: Operator, count: usize)

d/pat / c/pat / y/pat — open the search prompt in operator-pending mode so the operator applies over the range to the match on commit.

Source

fn apply_op_search_range(&mut self, op: Operator, origin: (usize, usize))

Apply a pending operator-search over the exclusive charwise range from origin to the current cursor (the just-found match position).

Source

fn visual_block_insert_at_left( &mut self, top: usize, bot: usize, col: usize, count: usize, )

VisualBlock I — enter Insert at the left edge of the block. count repeats the typed text on every row ([count]I).

Source

fn visual_block_append_at_right( &mut self, top: usize, bot: usize, col: usize, left: usize, count: usize, )

VisualBlock A — enter Insert at the right edge of the block. col is the append/typed column (one past the block’s right edge, or the ragged $ column); left is the block’s own left edge, where the cursor lands on Esc (verified against real nvim — A’s post-Esc cursor is NOT col on a block wider than one column). count repeats the typed text on every row ([count]A).

Source

fn execute_motion(&mut self, motion: Motion, count: usize)

Execute a motion, pushing to the jumplist for big jumps and updating the sticky column.

Source

fn update_block_vcol(&mut self, motion: &Motion)

Update the VisualBlock virtual column after a motion. Horizontal motions sync block_vcol to the cursor column; vertical motions leave it alone so the intended column survives clamping to shorter rows.

Source

fn apply_visual_operator(&mut self, op: Operator, count: usize)

Apply op over the current visual selection (char-wise, linewise, or block).

Source

fn replace_block_char(&mut self, ch: char)

VisualBlock r<ch> — replace every character cell in the block with ch.

Source

fn visual_replace_char(&mut self, ch: char)

Charwise (v) / linewise (V) Visual-mode r<ch> — replace every character in the selection with ch (B2). Newlines are preserved; registers are untouched.

Source

fn visual_text_obj_extend(&mut self, ch: char, inner: bool)

Visual-mode i<ch> / a<ch> — extend the selection to cover the text object identified by ch.

Source

fn insert_char(&mut self, ch: char)

Insert ch at the cursor. In Replace mode, overstrike the cell under the cursor instead; at end-of-line, always appends. With smartindent, closing brackets trigger a one-unit dedent on an otherwise-whitespace line.

Source

fn insert_newline(&mut self)

Insert a newline, applying autoindent / smartindent.

Source

fn insert_tab(&mut self)

Insert a tab (or spaces to the next softtabstop boundary under expandtab).

Source

fn insert_backspace(&mut self)

Backspace. Deletes a whole soft-tab run at an aligned boundary under softtabstop; joins with the previous line at column 0.

Source

fn insert_delete(&mut self)

Delete the char under the cursor; joins with the next line at EOL.

Source

fn insert_arrow(&mut self, dir: InsertDir)

Arrow-key motion in Insert, breaking the undo group per undo_break_on_motion.

Source

fn insert_home(&mut self)

Home in Insert.

Source

fn insert_end(&mut self)

End in Insert.

Source

fn insert_pageup(&mut self, viewport_h: u16)

PageUp in Insert.

Source

fn insert_pagedown(&mut self, viewport_h: u16)

PageDown in Insert.

Source

fn insert_ctrl_w(&mut self)

Ctrl-W — delete the word before the cursor.

Source

fn insert_ctrl_u(&mut self)

Ctrl-U — delete to the start of the line.

Source

fn insert_ctrl_h(&mut self)

Ctrl-H — backspace equivalent.

Source

fn insert_ctrl_o_arm(&mut self)

Ctrl-O — arm a one-shot Normal-mode command.

Source

fn insert_ctrl_r_arm(&mut self)

Ctrl-R — arm register paste; the next char names the register.

Source

fn insert_ctrl_t(&mut self)

Ctrl-T — indent the current line one shiftwidth.

Source

fn insert_ctrl_d(&mut self)

Ctrl-D — dedent the current line one shiftwidth.

Source

fn insert_ctrl_a(&mut self)

Ctrl-A — insert the text typed during the most recent insert session (vim’s “.” register).

Source

fn insert_ctrl_e(&mut self)

Ctrl-E — insert the char in the same column of the line below.

Source

fn insert_ctrl_y(&mut self)

Ctrl-Y — insert the char in the same column of the line above.

Source

fn insert_paste_register(&mut self, reg: char)

Paste register reg at the cursor (the Ctrl-R follow-up).

Source

fn insert_ctrl_bracket(&mut self)

Ctrl-[ — expand any pending abbreviation (Esc-equivalent trigger).

Source

fn leave_insert_to_normal(&mut self)

Esc from Insert — end the insert session and return to Normal.

Source

fn enter_insert_i(&mut self, count: usize)

i — insert before the cursor, count times on commit.

Source

fn enter_insert_shift_i(&mut self, count: usize)

I — insert at the first non-blank of the line.

Source

fn enter_insert_a(&mut self, count: usize)

a — append after the cursor.

Source

fn enter_insert_shift_a(&mut self, count: usize)

A — append at end-of-line.

Source

fn open_line_below(&mut self, count: usize)

o — open a new line below and insert.

Source

fn open_line_above(&mut self, count: usize)

O — open a new line above and insert.

Source

fn enter_replace_mode(&mut self, count: usize)

R — enter Replace mode.

Source

fn delete_char_forward(&mut self, count: usize)

x — delete count chars forward.

Source

fn delete_char_backward(&mut self, count: usize)

X — delete count chars backward.

Source

fn substitute_char(&mut self, count: usize)

s — substitute count chars (delete then insert).

Source

fn substitute_line(&mut self, count: usize)

S — substitute whole lines.

Source

fn delete_to_eol(&mut self, count: usize)

D — delete to end-of-line ([count]D extends down count-1 lines).

Source

fn change_to_eol(&mut self, count: usize)

C — change to end-of-line ([count]C extends down count-1 lines).

Source

fn yank_to_eol(&mut self, count: usize)

Y — yank to end-of-line.

Source

fn join_line(&mut self, count: usize)

J — join count lines.

Source

fn toggle_case_at_cursor(&mut self, count: usize)

~ — toggle case of count chars, advancing right.

Source

fn replay_last_change(&mut self, count: usize)

. — dot-repeat: replay the last buffered change at the cursor. A non-zero count replaces the change’s stored count (:h .3x then 2. deletes 2, not 6); count == 0 means no explicit count.

Source

fn set_mark_at_cursor(&mut self, ch: char)

m{ch} — record a mark named ch at the current cursor position. Invalid chars are silently ignored.

Source

fn goto_mark_line(&mut self, ch: char)

'{ch} — jump to mark ch, linewise (row, first non-blank). Pushes the pre-jump position onto the jumplist if the cursor actually moved.

Source

fn goto_mark_char(&mut self, ch: char)

`{ch} — jump to mark ch, charwise (exact row + col). Pushes the pre-jump position onto the jumplist if the cursor actually moved.

Source

fn try_goto_mark_line(&mut self, ch: char) -> MarkJump

Like VimEditorExt::goto_mark_line, but reports cross-buffer jumps: uppercase marks ('A''Z') living in another buffer return MarkJump::CrossBuffer so the app can switch slots first.

Source

fn try_goto_mark_char(&mut self, ch: char) -> MarkJump

Charwise counterpart of VimEditorExt::try_goto_mark_line.

Source

fn pending(&self) -> Pending

Return a clone of the current pending chord state.

Source

fn set_pending(&mut self, p: Pending)

Overwrite the pending chord state.

Source

fn take_pending(&mut self) -> Pending

Atomically take the pending chord, replacing it with Pending::None.

Source

fn count(&self) -> usize

Return the raw digit-prefix count (0 = no prefix typed yet).

Source

fn set_count(&mut self, c: usize)

Overwrite the digit-prefix count directly. Clamped at crate::vim::MAX_COUNT (vim’s documented count ceiling, :h count).

Source

fn accumulate_count_digit(&mut self, digit: usize)

Accumulate one more digit into the count prefix (mirrors count * 10 + digit).

Source

fn reset_count(&mut self)

Reset the count prefix to zero (no pending count).

Source

fn take_count(&mut self) -> usize

Consume the count and return it; resets to zero. Returns 1 when no prefix was typed (mirrors take_count in vim.rs).

Source

fn fsm_mode(&self) -> Mode

Return the FSM-internal mode (Normal / Insert / Visual / …).

Source

fn set_fsm_mode(&mut self, m: Mode)

Overwrite the FSM-internal mode without side-effects. Prefer the semantic primitives (enter_insert_i, enter_visual_char, …).

Source

fn is_replaying(&self) -> bool

true while the . dot-repeat replay is running.

Source

fn set_replaying(&mut self, v: bool)

Set or clear the dot-replay flag.

Source

fn is_one_shot_normal(&self) -> bool

true when we entered Normal from Insert via Ctrl-o and will return to Insert after the next complete command.

Source

fn set_one_shot_normal(&mut self, v: bool)

Set or clear the Ctrl-o one-shot-normal flag.

Source

fn last_find(&self) -> Option<(char, bool, bool)>

Return the last f/F/t/T target as (char, forward, till), or None before any find command was executed.

Source

fn set_last_find(&mut self, target: Option<(char, bool, bool)>)

Overwrite the stored last-find target.

Source

fn sneak(&mut self, c1: char, c2: char, forward: bool, count: usize)

Perform a vim-sneak style two-char digraph jump. Scans the buffer from the current cursor for the count-th occurrence of c1+c2. forward=true searches ahead; forward=false searches backward. Respects Settings::motion_sneak — callers (hjkl-vim FSM) should already gate on the setting; this method always executes the sneak.

Source

fn apply_op_sneak( &mut self, op: Operator, c1: char, c2: char, forward: bool, total_count: usize, )

Apply an operator over a sneak digraph range. Charwise exclusive — deletes from cursor up to (not including) the first char of the match.

Source

fn last_sneak(&self) -> Option<((char, char), bool)>

Return the last sneak digraph and direction stored after a sneak motion. Some(((c1, c2), forward)) when a sneak has been performed this session; None before any sneak. Used by ;/, repeat and tests.

Source

fn last_change(&self) -> Option<LastChange>

Return a clone of the last recorded mutating change, or None before any change has been made.

Source

fn set_last_change(&mut self, lc: Option<LastChange>)

Overwrite the stored last-change record.

Source

fn last_change_mut(&mut self) -> Option<&mut LastChange>

Borrow the last-change record mutably (e.g. to fill in an inserted field after the insert session completes).

Source

fn insert_session(&self) -> Option<&InsertSession>

Borrow the active insert session, or None when not in Insert mode.

Source

fn insert_session_mut(&mut self) -> Option<&mut InsertSession>

Borrow the active insert session mutably.

Source

fn take_insert_session(&mut self) -> Option<InsertSession>

Atomically take the insert session out, leaving None.

Source

fn set_insert_session(&mut self, s: Option<InsertSession>)

Install a new insert session, replacing any existing one.

Source

fn pending_register(&self) -> Option<char>

Return the user’s pending register selection (set via "<reg> chord before an operator). None if no register was selected — caller should use the unnamed register ".

Read-only — does not consume / clear the pending selection. The register is cleared by the engine after the next operator fires.

Promoted in 0.6.X for Phase 4e to let the App’s visual-op dispatch arm honor "a + visual op chord sequences.

Source

fn pending_register_is_clipboard(&self) -> bool

True when the user’s pending register selector is + or *. the host peeks this so it can refresh sync_clipboard_register only when a clipboard read is actually about to happen.

Source

fn recording_register(&self) -> Option<char>

Register currently being recorded into via q{reg}. None when no recording is active. Hosts use this to surface a “recording @r” indicator in the status line.

Source

fn pending_count(&self) -> Option<u32>

Pending repeat count the user has typed but not yet resolved (e.g. pressing 5 before d). None when nothing is pending. Hosts surface this in a “showcmd” area.

Source

fn pending_op(&self) -> Option<char>

The operator character for any in-flight operator that is waiting for a motion (e.g. d after the user types d but before a motion). Returns None when no operator is pending.

Source

fn is_chord_pending(&self) -> bool

true when the engine is in any pending chord state — waiting for the next key to complete a command (e.g. r<char> replace, f<char> find, m<a> set-mark, '<a> goto-mark, operator-pending after d / c / y, g-prefix continuation, z-prefix continuation, register selection "<reg>, macro recording target, etc).

Hosts use this to bypass their own chord dispatch (keymap tries, etc.) and forward keys directly to the engine so in-flight commands can complete without the host eating their continuation keys.

Source

fn is_insert_register_pending(&self) -> bool

true when insert_ctrl_r_arm() has been called and the dispatcher is waiting for the next typed character to name the register to paste. The dispatcher should call insert_paste_register(c) instead of insert_char(c) for the next printable key, then the flag auto-clears.

Phase 6.5: exposed so the app-level dispatch_insert_key can branch without having to drive the full FSM.

Source

fn clear_insert_register_pending(&mut self)

Clear the Ctrl-R register-paste pending flag. Call this immediately before insert_paste_register(c) in app-level dispatchers so that the flag does not persist into the next key. Call before insert_paste_register_bridge (which hjkl_vim::insert does).

Phase 6.5: used by dispatch_insert_key in the app crate.

Source

fn set_pending_register(&mut self, reg: char)

Set vim.pending_register to Some(reg) if reg is a valid register selector (az, AZ, 09, ", +, *, _). Invalid chars are silently ignored (no-op), matching the engine FSM’s handle_select_register behaviour.

Promoted to the public surface in 0.5.17 so the hjkl-vim PendingState::SelectRegister reducer can dispatch SetPendingRegister without re-entering the engine FSM. handle_select_register (engine FSM path for macro-replay / defensive coverage) delegates here to avoid logic duplication.

Source

fn start_macro_record(&mut self, reg: char)

Begin recording keystrokes into register reg. The caller (app) is responsible for stopping the recording via stop_macro_record when the user presses bare q.

  • Uppercase reg (e.g. 'A') appends to the existing lowercase recording by pre-seeding recording_keys with the decoded text of the matching lowercase register, matching vim’s capital-register append semantics.
  • Lowercase reg clears recording_keys (fresh recording).
  • Invalid chars (non-alphabetic, non-digit) are silently ignored.

Promoted to the public surface in Phase 5b so the app’s route_chord_key can start a recording without re-entering the engine FSM. handle_record_macro_target (engine FSM path for macro-replay defensive coverage) continues to use the same logic via delegation.

Source

fn stop_macro_record(&mut self)

Finalize the active recording: encode recording_keys as text and write to the matching (lowercase) named register. Clears both recording_macro and recording_keys. No-ops if no recording is active.

Promoted to the public surface in Phase 5b so the app’s QChord action can stop a recording when the user presses bare q without re-entering the engine FSM.

Source

fn is_recording_macro(&self) -> bool

Returns true while a q{reg} recording is in progress. Hosts use this to show a “recording @r” status indicator and to decide whether bare q should stop the recording or open the RecordMacroTarget chord.

Source

fn is_replaying_macro(&self) -> bool

Returns true while a macro is being replayed. The app sets this flag (via play_macro) and clears it (via end_macro_replay) around the re-feed loop so the recorder hook can skip double-capture.

Source

fn play_macro(&mut self, reg: char) -> Vec<Input>

Decode the named register reg into a Vec<hjkl_engine::input::Input> and prepare for replay, returning ONE iteration of the inputs the app should re-feed through route_chord_key.

Count semantics live in the HOST: 3@a replays the returned keys three times by looping (or re-splicing a work queue), never by materializing keys × count up front — an unclamped 999999999@a would otherwise allocate multi-GB before the first key plays (audit R2).

Resolves reg:

  • '@' → use vim.last_macro; returns empty vec if none.
  • Any other char → lowercase it, read the register, decode.

Side-effects:

  • Sets vim.last_macro to the resolved register.
  • Sets vim.replaying_macro = true so the recorder hook skips during replay. The app calls end_macro_replay after the loop finishes.

Returns an empty vec (and no side-effects for '@') if the register is unset or empty.

Source

fn end_macro_replay(&mut self)

Clear the replaying_macro flag. Called by the app after the re-feed loop in the PlayMacro commit arm completes (or aborts).

Source

fn record_input(&mut self, input: Input)

Append input to the active recording (recording_keys) if and only if a recording is in progress AND we are not currently replaying. Called by the app’s route_chord_key recorder hook so that user keystrokes captured through the app-level chord path are recorded (rather than relying solely on the engine FSM’s in-step hook).

Source

fn force_normal(&mut self)

Force back to Normal mode (used when dismissing completions etc.).

Source

fn mouse_click_doc(&mut self, row: usize, col: usize)

Handle a left-button click at doc-space (row, col). Exits Visual mode if active, breaks the insert-mode undo group (vim parity for undo_break_on_motion), then moves the cursor. The EOL clamp is mode-aware (neovim parity): Normal/Visual cap at len - 1, Insert allows the one-past-EOL position.

Source

fn mouse_begin_drag(&mut self)

Begin a mouse-drag selection: anchor at the cursor and enter Visual-char mode. Idempotent if already in Visual-char.

Source

fn range_for_op_motion( &mut self, motion_key: char, total_count: usize, ) -> Option<(usize, usize)>

Dry-run motion_key and return the (min_row, max_row) span between the cursor row and the motion’s target row, restoring the cursor afterwards. None when motion_key is not a known motion.

Source

fn apply_motion(&mut self, kind: MotionKind, count: usize)

Execute a named cursor motion kind, repeated count times. Maps the keymap-layer MotionKind onto the vim motion primitives, bypassing the FSM. Identical cursor semantics to the FSM path — sticky column, scroll sync and big-jump tracking all apply.

Source

fn range_for_op_g( &mut self, ch: char, total_count: usize, ) -> Option<(usize, usize)>

Dry-run a g-prefixed motion and return (min_row, max_row) — for =gg / =gj etc. None for unknown ch. The cursor is restored.

Source

fn range_for_op_text_obj( &self, ch: char, inner: bool, total_count: usize, ) -> Option<(usize, usize)>

Dry-run a text object and return (min_row, max_row) — for =iw / =ap etc. None for unknown ch.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<H: Host> VimEditorExt for Editor<View, H>

Source§

fn visual_block_bounds(&self) -> (usize, usize, usize, usize)

Source§

fn block_highlight(&self) -> Option<(usize, usize, usize, usize)>

Source§

fn char_highlight(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn visual_char_range_exclusive( &self, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn line_highlight(&self) -> Option<(usize, usize)>

Source§

fn buffer_selection(&self) -> Option<Selection>

Source§

fn selection_highlight(&self) -> Option<Highlight>

Source§

fn text_object_inner_word(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_word(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_big_word(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_big_word( &self, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_quote( &self, quote: char, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_bracket( &self, open: char, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_sentence(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_sentence( &self, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_paragraph( &self, ) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_inner_tag(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn text_object_around_tag(&self) -> Option<((usize, usize), (usize, usize))>

Source§

fn delete_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Source§

fn yank_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Source§

fn change_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, register: char, )

Source§

fn indent_range( &mut self, start: (usize, usize), end: (usize, usize), count: i32, shiftwidth: u32, )

Source§

fn case_range( &mut self, start: (usize, usize), end: (usize, usize), kind: RangeKind, op: Operator, )

Source§

fn delete_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Source§

fn yank_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Source§

fn change_block( &mut self, top_row: usize, bot_row: usize, left_col: usize, right_col: usize, register: char, )

Source§

fn indent_block( &mut self, top_row: usize, bot_row: usize, _left_col: usize, _right_col: usize, count: i32, )

Source§

fn auto_indent_range(&mut self, start: (usize, usize), end: (usize, usize))

Source§

fn paste_after(&mut self, count: usize)

Source§

fn paste_before(&mut self, count: usize)

Source§

fn paste_cursor_after(&mut self, before: bool, count: usize)

Source§

fn paste_reindent(&mut self, before: bool, count: usize)

Source§

fn visual_paste(&mut self, before: bool)

Source§

fn adjust_number_visual(&mut self, delta: i64, sequential: bool)

Source§

fn ampersand_repeat(&mut self)

Source§

fn visual_join(&mut self, with_space: bool)

Source§

fn goto_percent(&mut self, count: usize)

Source§

fn jump_back(&mut self, count: usize)

Source§

fn jump_forward(&mut self, count: usize)

Source§

fn search_repeat(&mut self, forward: bool, count: usize)

Source§

fn replace_char_at(&mut self, ch: char, count: usize)

Source§

fn find_char(&mut self, ch: char, forward: bool, till: bool, count: usize)

Source§

fn after_g(&mut self, ch: char, count: usize)

Source§

fn after_z(&mut self, ch: char, count: usize)

Source§

fn apply_op_motion( &mut self, op: Operator, motion_key: char, total_count: usize, )

Source§

fn apply_op_double(&mut self, op: Operator, total_count: usize)

Source§

fn apply_op_find( &mut self, op: Operator, ch: char, forward: bool, till: bool, count: usize, )

Source§

fn apply_op_text_obj( &mut self, op: Operator, ch: char, inner: bool, total_count: usize, )

Source§

fn apply_op_g(&mut self, op: Operator, ch: char, total_count: usize)

Source§

fn vim_mode(&self) -> VimMode

Source§

fn enter_visual_char(&mut self)

Source§

fn enter_visual_line(&mut self)

Source§

fn enter_visual_block(&mut self)

Source§

fn exit_visual_to_normal(&mut self)

Source§

fn visual_o_toggle(&mut self)

Source§

fn reenter_last_visual(&mut self)

Source§

fn set_mode(&mut self, mode: VimMode)

Source§

fn visual_anchor(&self) -> (usize, usize)

Source§

fn set_visual_anchor(&mut self, anchor: (usize, usize))

Source§

fn visual_line_anchor(&self) -> usize

Source§

fn set_visual_line_anchor(&mut self, row: usize)

Source§

fn block_anchor(&self) -> (usize, usize)

Source§

fn set_block_anchor(&mut self, anchor: (usize, usize))

Source§

fn block_vcol(&self) -> usize

Source§

fn set_block_vcol(&mut self, vcol: usize)

Source§

fn block_to_eol(&self) -> bool

Source§

fn set_block_to_eol(&mut self, to_eol: bool)

Source§

fn set_pending_register_raw(&mut self, reg: Option<char>)

Source§

fn take_pending_register_raw(&mut self) -> Option<char>

Source§

fn recording_macro(&self) -> Option<char>

Source§

fn set_recording_macro(&mut self, reg: Option<char>)

Source§

fn push_recording_key(&mut self, input: Input)

Source§

fn take_recording_keys(&mut self) -> Vec<Input>

Source§

fn set_recording_keys(&mut self, keys: Vec<Input>)

Source§

fn recording_keys_len(&self) -> usize

Source§

fn is_replaying_macro_raw(&self) -> bool

Source§

fn set_replaying_macro_raw(&mut self, v: bool)

Source§

fn last_macro(&self) -> Option<char>

Source§

fn set_last_macro(&mut self, reg: Option<char>)

Source§

fn last_insert_pos(&self) -> Option<(usize, usize)>

Source§

fn set_last_insert_pos(&mut self, pos: Option<(usize, usize)>)

Source§

fn last_visual(&self) -> Option<LastVisual>

Source§

fn set_last_visual(&mut self, snap: Option<LastVisual>)

Source§

fn insert_pending_register(&self) -> bool

Source§

fn set_insert_pending_register(&mut self, v: bool)

Source§

fn change_mark_start(&self) -> Option<(usize, usize)>

Source§

fn take_change_mark_start(&mut self) -> Option<(usize, usize)>

Source§

fn set_change_mark_start(&mut self, pos: Option<(usize, usize)>)

Source§

fn is_visual(&self) -> bool

Source§

fn apply_op_with_motion_direct( &mut self, op: Operator, motion: &Motion, count: usize, )

Source§

fn adjust_number(&mut self, delta: i64)

Source§

fn enter_search_op(&mut self, forward: bool, op: Operator, count: usize)

Source§

fn apply_op_search_range(&mut self, op: Operator, origin: (usize, usize))

Source§

fn visual_block_insert_at_left( &mut self, top: usize, bot: usize, col: usize, count: usize, )

Source§

fn visual_block_append_at_right( &mut self, top: usize, bot: usize, col: usize, left: usize, count: usize, )

Source§

fn execute_motion(&mut self, motion: Motion, count: usize)

Source§

fn update_block_vcol(&mut self, motion: &Motion)

Source§

fn apply_visual_operator(&mut self, op: Operator, count: usize)

Source§

fn replace_block_char(&mut self, ch: char)

Source§

fn visual_replace_char(&mut self, ch: char)

Source§

fn visual_text_obj_extend(&mut self, ch: char, inner: bool)

Source§

fn insert_char(&mut self, ch: char)

Source§

fn insert_newline(&mut self)

Source§

fn insert_tab(&mut self)

Source§

fn insert_backspace(&mut self)

Source§

fn insert_delete(&mut self)

Source§

fn insert_arrow(&mut self, dir: InsertDir)

Source§

fn insert_home(&mut self)

Source§

fn insert_end(&mut self)

Source§

fn insert_pageup(&mut self, viewport_h: u16)

Source§

fn insert_pagedown(&mut self, viewport_h: u16)

Source§

fn insert_ctrl_w(&mut self)

Source§

fn insert_ctrl_u(&mut self)

Source§

fn insert_ctrl_h(&mut self)

Source§

fn insert_ctrl_o_arm(&mut self)

Source§

fn insert_ctrl_r_arm(&mut self)

Source§

fn insert_ctrl_t(&mut self)

Source§

fn insert_ctrl_d(&mut self)

Source§

fn insert_ctrl_a(&mut self)

Source§

fn insert_ctrl_e(&mut self)

Source§

fn insert_ctrl_y(&mut self)

Source§

fn insert_paste_register(&mut self, reg: char)

Source§

fn insert_ctrl_bracket(&mut self)

Source§

fn leave_insert_to_normal(&mut self)

Source§

fn enter_insert_i(&mut self, count: usize)

Source§

fn enter_insert_shift_i(&mut self, count: usize)

Source§

fn enter_insert_a(&mut self, count: usize)

Source§

fn enter_insert_shift_a(&mut self, count: usize)

Source§

fn open_line_below(&mut self, count: usize)

Source§

fn open_line_above(&mut self, count: usize)

Source§

fn enter_replace_mode(&mut self, count: usize)

Source§

fn delete_char_forward(&mut self, count: usize)

Source§

fn delete_char_backward(&mut self, count: usize)

Source§

fn substitute_char(&mut self, count: usize)

Source§

fn substitute_line(&mut self, count: usize)

Source§

fn delete_to_eol(&mut self, count: usize)

Source§

fn change_to_eol(&mut self, count: usize)

Source§

fn yank_to_eol(&mut self, count: usize)

Source§

fn join_line(&mut self, count: usize)

Source§

fn toggle_case_at_cursor(&mut self, count: usize)

Source§

fn replay_last_change(&mut self, count: usize)

Source§

fn set_mark_at_cursor(&mut self, ch: char)

Source§

fn goto_mark_line(&mut self, ch: char)

Source§

fn goto_mark_char(&mut self, ch: char)

Source§

fn try_goto_mark_line(&mut self, ch: char) -> MarkJump

Source§

fn try_goto_mark_char(&mut self, ch: char) -> MarkJump

Source§

fn pending(&self) -> Pending

Source§

fn set_pending(&mut self, p: Pending)

Source§

fn take_pending(&mut self) -> Pending

Source§

fn count(&self) -> usize

Source§

fn set_count(&mut self, c: usize)

Source§

fn accumulate_count_digit(&mut self, digit: usize)

Source§

fn reset_count(&mut self)

Source§

fn take_count(&mut self) -> usize

Source§

fn fsm_mode(&self) -> Mode

Source§

fn set_fsm_mode(&mut self, m: Mode)

Source§

fn is_replaying(&self) -> bool

Source§

fn set_replaying(&mut self, v: bool)

Source§

fn is_one_shot_normal(&self) -> bool

Source§

fn set_one_shot_normal(&mut self, v: bool)

Source§

fn last_find(&self) -> Option<(char, bool, bool)>

Source§

fn set_last_find(&mut self, target: Option<(char, bool, bool)>)

Source§

fn sneak(&mut self, c1: char, c2: char, forward: bool, count: usize)

Source§

fn apply_op_sneak( &mut self, op: Operator, c1: char, c2: char, forward: bool, total_count: usize, )

Source§

fn last_sneak(&self) -> Option<((char, char), bool)>

Source§

fn last_change(&self) -> Option<LastChange>

Source§

fn set_last_change(&mut self, lc: Option<LastChange>)

Source§

fn last_change_mut(&mut self) -> Option<&mut LastChange>

Source§

fn insert_session(&self) -> Option<&InsertSession>

Source§

fn insert_session_mut(&mut self) -> Option<&mut InsertSession>

Source§

fn take_insert_session(&mut self) -> Option<InsertSession>

Source§

fn set_insert_session(&mut self, s: Option<InsertSession>)

Source§

fn pending_register(&self) -> Option<char>

Source§

fn pending_register_is_clipboard(&self) -> bool

Source§

fn recording_register(&self) -> Option<char>

Source§

fn pending_count(&self) -> Option<u32>

Source§

fn pending_op(&self) -> Option<char>

Source§

fn is_chord_pending(&self) -> bool

Source§

fn is_insert_register_pending(&self) -> bool

Source§

fn clear_insert_register_pending(&mut self)

Source§

fn set_pending_register(&mut self, reg: char)

Source§

fn start_macro_record(&mut self, reg: char)

Source§

fn stop_macro_record(&mut self)

Source§

fn is_recording_macro(&self) -> bool

Source§

fn is_replaying_macro(&self) -> bool

Source§

fn play_macro(&mut self, reg: char) -> Vec<Input>

Source§

fn end_macro_replay(&mut self)

Source§

fn record_input(&mut self, input: Input)

Source§

fn force_normal(&mut self)

Source§

fn mouse_click_doc(&mut self, row: usize, col: usize)

Source§

fn mouse_begin_drag(&mut self)

Source§

fn range_for_op_motion( &mut self, motion_key: char, total_count: usize, ) -> Option<(usize, usize)>

Source§

fn apply_motion(&mut self, kind: MotionKind, count: usize)

Source§

fn range_for_op_g( &mut self, ch: char, total_count: usize, ) -> Option<(usize, usize)>

Source§

fn range_for_op_text_obj( &self, ch: char, inner: bool, total_count: usize, ) -> Option<(usize, usize)>

Implementors§