pub enum Operator {
Delete,
Change,
Yank,
Uppercase,
Lowercase,
ToggleCase,
Indent,
Outdent,
Fold,
Reflow,
AutoIndent,
Filter,
}Variants§
Delete
Change
Yank
Uppercase
gU{motion} — uppercase the range. Entered via the g prefix
in normal mode or U in visual mode.
Lowercase
gu{motion} — lowercase the range. u in visual mode.
ToggleCase
g~{motion} — toggle case of the range. ~ in visual mode
(character at the cursor for the single-char ~ command stays
its own code path in normal mode).
Indent
>{motion} — indent the line range by shiftwidth spaces.
Always linewise, even when the motion is char-wise — mirrors
vim’s behaviour where >w indents the current line, not the
word on it.
Outdent
<{motion} — outdent the line range (remove up to
shiftwidth leading spaces per line).
Fold
zf{motion} / zf{textobj} / Visual zf — create a closed
fold spanning the row range. Doesn’t mutate the buffer text;
cursor restores to the operator’s start position.
Reflow
gq{motion} — reflow the row range to settings.textwidth.
Greedy word-wrap: collapses each paragraph (blank-line-bounded
run) into space-separated words, then re-emits lines whose
width stays under textwidth. Always linewise, like indent.
AutoIndent
={motion} — auto-indent the line range using shiftwidth-based
bracket depth counting (v1 dumb reindent). Always linewise.
See auto_indent_range for the algorithm and its limitations.
Filter
!{motion} — filter the line range through an external shell command.
The range text is piped to the command’s stdin; stdout replaces the
range in the buffer. Non-zero exit or spawn failure returns an error
to the caller without mutating the buffer.