Skip to main content

Builtins

Struct Builtins 

Source
pub struct Builtins {
Show 83 fields pub word_forward: MotionId, pub word_backward: MotionId, pub word_end: MotionId, pub first_non_blank: MotionId, pub find_char_forward: MotionId, pub find_char_backward: MotionId, pub till_char_forward: MotionId, pub till_char_backward: MotionId, pub big_word_forward: MotionId, pub big_word_backward: MotionId, pub big_word_end: MotionId, pub paragraph_forward: MotionId, pub paragraph_backward: MotionId, pub sentence_forward: MotionId, pub sentence_backward: MotionId, pub char_left: MotionId, pub char_right: MotionId, pub line_up: MotionId, pub line_down: MotionId, pub line_start: MotionId, pub line_end: MotionId, pub goto_first_line: MotionId, pub goto_last_line: MotionId, pub find_repeat: MotionId, pub find_repeat_reverse: MotionId, pub match_pair: MotionId, pub goto_next_fold: MotionId, pub goto_prev_fold: MotionId, pub search_next: MotionId, pub search_prev: MotionId, pub search_word_forward: MotionId, pub search_word_backward: MotionId, pub search_word_forward_partial: MotionId, pub search_word_backward_partial: MotionId, pub mark_line: MotionId, pub display_line_down: MotionId, pub display_line_up: MotionId, pub display_line_start: MotionId, pub display_line_end: MotionId, pub mark_exact: MotionId, pub viewport_top: MotionId, pub viewport_middle: MotionId, pub viewport_bottom: MotionId, pub delete: OperatorId, pub change: OperatorId, pub yank: OperatorId, pub indent_left: OperatorId, pub indent_right: OperatorId, pub reindent: OperatorId, pub reflow: OperatorId, pub reformat: OperatorId, pub create_fold: OperatorId, pub upper: OperatorId, pub lower: OperatorId, pub toggle_case: OperatorId, pub search: OperatorId, pub replace_char: OperatorId, pub inner_paragraph: TextObjectId, pub around_paragraph: TextObjectId, pub inner_sentence: TextObjectId, pub around_sentence: TextObjectId, pub inner_word: TextObjectId, pub around_word: TextObjectId, pub inner_quote_double: TextObjectId, pub around_quote_double: TextObjectId, pub inner_quote_single: TextObjectId, pub around_quote_single: TextObjectId, pub inner_quote_backtick: TextObjectId, pub around_quote_backtick: TextObjectId, pub inner_paren: TextObjectId, pub around_paren: TextObjectId, pub inner_bracket: TextObjectId, pub around_bracket: TextObjectId, pub inner_brace: TextObjectId, pub around_brace: TextObjectId, pub inner_tag: TextObjectId, pub around_tag: TextObjectId, pub inner_big_word: TextObjectId, pub around_big_word: TextObjectId, pub inner_angle: TextObjectId, pub around_angle: TextObjectId, pub inner_comment: TextObjectId, pub around_comment: TextObjectId,
}
Expand description

The ids of every native built-in, as returned by populate.

A typed shortcut for callers that hold the populated registry and need a specific builtin without a name lookup (the keystroke parser, the host’s keymap wiring, tests, benches). Every field is also reachable by its registered name through CommandRegistry::id_by_name; the doc on each field gives that name and the vim key it implements. Default yields placeholder ids that name nothing, for code that needs a value before the registry is populated.

Fields§

§word_forward: MotionId

motion:word-forward — vim’s w: start of the next word (3-way word/punct/blank classes). Exclusive; tagged word-forward so dw / cw stop at the line end.

§word_backward: MotionId

motion:word-backward — vim’s b: start of the previous word.

§word_end: MotionId

motion:word-end — vim’s e: last byte of the current or next word. Inclusive.

§first_non_blank: MotionId

motion:first-non-blank — vim’s ^: first non-blank byte of the line. Exclusive.

§find_char_forward: MotionId

motion:find-char-forward — vim’s f{char}: next args.char on the line, landing on it. Inclusive.

§find_char_backward: MotionId

motion:find-char-backward — vim’s F{char}: previous args.char on the line, landing on it.

§till_char_forward: MotionId

motion:till-char-forward — vim’s t{char}: one byte before the next args.char on the line.

§till_char_backward: MotionId

motion:till-char-backward — vim’s T{char}: one byte after the previous args.char on the line.

§big_word_forward: MotionId

motion:big-word-forward — vim’s W: start of the next whitespace-delimited WORD. Tagged word-forward, like w.

§big_word_backward: MotionId

motion:big-word-backward — vim’s B: start of the previous WORD.

§big_word_end: MotionId

motion:big-word-end — vim’s E: last byte of the current or next WORD.

§paragraph_forward: MotionId

motion:paragraph-forward — vim’s }: the next blank line (paragraph boundary). A jump.

§paragraph_backward: MotionId

motion:paragraph-backward — vim’s {: the previous paragraph boundary. A jump.

§sentence_forward: MotionId

motion:sentence-forward — vim’s ): start of the next sentence. A jump.

§sentence_backward: MotionId

motion:sentence-backward — vim’s (: start of the previous sentence. A jump.

§char_left: MotionId

motion:char-left — vim’s h: one character left, within the line (steps whole UTF-8 scalars).

§char_right: MotionId

motion:char-right — vim’s l: one character right, within the line.

§line_up: MotionId

motion:line-up — vim’s k: one line up, aiming at the goal column (keeps curswant).

§line_down: MotionId

motion:line-down — vim’s j: one line down, aiming at the goal column (keeps curswant).

§line_start: MotionId

motion:line-start — vim’s 0: first byte of the line. Exclusive.

§line_end: MotionId

motion:line-end — vim’s $: end of the line; pins the goal column to end-of-line.

§goto_first_line: MotionId

motion:goto-first-line — vim’s gg ({count}gg goes to that line). Linewise jump.

§goto_last_line: MotionId

motion:goto-last-line — vim’s G ({count}G goes to that line). Linewise jump.

§find_repeat: MotionId

VM.3c: vim’s ; and , — repeat the last f / F / t / T in the same or the opposite direction. Motions for the same reason % is: vim composes them (d;) and extends a selection with them.

§find_repeat_reverse: MotionId

motion:find-repeat-reverse — vim’s ,: the last find, reversed (see FindKind::reversed).

§match_pair: MotionId

VM.3b: vim’s %. A MOTION, not an action — vim composes it (d% deletes a bracketed span, v% selects one), and it took being typed as an action for d% and v% to be silently unbound here.

§goto_next_fold: MotionId

VM.3i: vim’s zj / zk, as the motions they are in vim.

§goto_prev_fold: MotionId

motion:goto-prev-fold — vim’s zk: end of the previous fold.

§search_next: MotionId

VM.3d-2: vim’s n / N / * / #, as the motions they are in vim.

§search_prev: MotionId

motion:search-prev — vim’s N: repeat the last search in the opposite direction.

§search_word_forward: MotionId

motion:search-word-forward — vim’s *: search forward for the whole word under the cursor.

§search_word_backward: MotionId

motion:search-word-backward — vim’s #: search backward for the whole word under the cursor.

§search_word_forward_partial: MotionId

VM.3d-3: vim’s g* / g# — the word under the cursor, matched anywhere rather than only as a whole word.

§search_word_backward_partial: MotionId

motion:search-word-backward-partial — vim’s g#: # without the whole-word boundaries.

§mark_line: MotionId

VM.3e: vim’s 'x / `x, as the motions they are in vim.

§display_line_down: MotionId

VM.3g-2: vim’s gj / gk / g0 / g$, as the motions they are.

§display_line_up: MotionId

motion:display-line-up — vim’s gk: one display row up, keeping the screen column.

§display_line_start: MotionId

motion:display-line-start — vim’s g0: first column of the display row.

§display_line_end: MotionId

motion:display-line-end — vim’s g$: last column of the display row.

§mark_exact: MotionId

motion:mark-exact — vim’s `x: the exact position of mark args.char.

§viewport_top: MotionId

VM.3f: vim’s H / M / L, as the motions they are in vim.

§viewport_middle: MotionId

motion:viewport-middle — vim’s M: the middle of the lines shown.

§viewport_bottom: MotionId

motion:viewport-bottom — vim’s L: the count-th line from the bottom of the window.

§delete: OperatorId

operator:delete — vim’s d: delete the range and yank it (unnamed register, or "x).

§change: OperatorId

operator:change — vim’s c: delete the range and enter Insert mode.

§yank: OperatorId

operator:yank — vim’s y: copy the range into the register without editing.

§indent_left: OperatorId

operator:indent-left — vim’s <: remove one indent unit (shiftwidth / expandtab, resolved by the host into OperatorContext::indent) from each non-blank line.

§indent_right: OperatorId

operator:indent-right — vim’s >: add one indent unit to each non-blank line.

§reindent: OperatorId

IN.7: vim’s = — reindent, leading whitespace only.

§reflow: OperatorId

RF.2: vim’s gq and gw — reflow to textwidth. ONE operator behind both chords; they differ only in cursor placement in vim, and this preserves the cursor (gw’s behaviour).

§reformat: OperatorId

RF.6: g= — the operator form of :format. Not a vim chord; see operator_reformat for why it exists.

§create_fold: OperatorId

VM.3h: vim’s zf, as the operator it is in vim.

§upper: OperatorId

operator:upper — vim’s gU: uppercase ASCII letters in the range.

§lower: OperatorId

operator:lower — vim’s gu: lowercase ASCII letters in the range.

§toggle_case: OperatorId

operator:toggle-case — vim’s g~: toggle the case of ASCII letters in the range.

§search: OperatorId

operator:search — g/ (a Lattice extension, not vim): project-search for the spanned text; emits the same SearchTrigger as :search.

§replace_char: OperatorId

operator:replace-char — vim’s r{char} / Visual r: overwrite each non-newline character in the range with args.char.

§inner_paragraph: TextObjectId

text-object:inner-paragraph — vim’s ip: the run of non-blank lines around the cursor.

§around_paragraph: TextObjectId

text-object:around-paragraph — vim’s ap: ip plus trailing blank lines.

§inner_sentence: TextObjectId

text-object:inner-sentence — vim’s is: the sentence around the cursor.

§around_sentence: TextObjectId

text-object:around-sentence — vim’s as: is plus trailing whitespace.

§inner_word: TextObjectId

text-object:inner-word — vim’s iw: the word around the cursor.

§around_word: TextObjectId

text-object:around-word — vim’s aw: iw plus trailing whitespace.

§inner_quote_double: TextObjectId

text-object:inner-quote-double — vim’s i": inside the surrounding double quotes.

§around_quote_double: TextObjectId

text-object:around-quote-double — vim’s a": i" including the quotes.

§inner_quote_single: TextObjectId

text-object:inner-quote-single — vim’s i': inside the surrounding single quotes.

§around_quote_single: TextObjectId

text-object:around-quote-single — vim’s a': i' including the quotes.

§inner_quote_backtick: TextObjectId

text-object:inner-quote-backtick — vim’s i` : inside the surrounding backticks.

§around_quote_backtick: TextObjectId

text-object:around-quote-backtick — vim’s a` : i` including the backticks.

§inner_paren: TextObjectId

text-object:inner-paren — vim’s i(: inside the innermost enclosing ().

§around_paren: TextObjectId

text-object:around-paren — vim’s a(: i( including the parentheses.

§inner_bracket: TextObjectId

text-object:inner-bracket — vim’s i[: inside the innermost enclosing [].

§around_bracket: TextObjectId

text-object:around-bracket — vim’s a[: i[ including the brackets.

§inner_brace: TextObjectId

text-object:inner-brace — vim’s i{: inside the innermost enclosing {}.

§around_brace: TextObjectId

text-object:around-brace — vim’s a{: i{ including the braces.

§inner_tag: TextObjectId

text-object:inner-tag — vim’s it: inside the innermost enclosing XML/HTML tag pair.

§around_tag: TextObjectId

text-object:around-tag — vim’s at: it including the tags.

§inner_big_word: TextObjectId

text-object:inner-big-word — vim’s iW: the WORD around the cursor.

§around_big_word: TextObjectId

text-object:around-big-word — vim’s aW: iW plus trailing whitespace.

§inner_angle: TextObjectId

text-object:inner-angle — vim’s i<: inside the innermost enclosing <>.

§around_angle: TextObjectId

text-object:around-angle — vim’s a<: i< including the angle brackets.

§inner_comment: TextObjectId

text-object:inner-comment — iC (Lattice): the comment text, first line’s leader stripped. Needs CommentSyntax from the host.

§around_comment: TextObjectId

text-object:around-comment — aC (Lattice): the contiguous run of comment lines, markers included.

Trait Implementations§

Source§

impl Clone for Builtins

Source§

fn clone(&self) -> Builtins

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Builtins

Source§

impl Debug for Builtins

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Builtins

Source§

fn default() -> Builtins

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more