pub enum OperatorKind {
Delete,
Yank,
Change,
Indent,
Outdent,
Uppercase,
Lowercase,
ToggleCase,
Reflow,
AutoIndent,
Filter,
Comment,
}Expand description
Operator identity carried by the reducer. Kept independent of
hjkl-engine so hjkl-vim has no upstream dependency.
The five operators that can be entered directly from Normal mode via bare
d / y / c / > / <, plus the four g-prefix case/reflow operators
(gU / gu / g~ / gq) bridged through the reducer in chunk 2c-v.
Fold (zf) does not enter bare op-pending so it is omitted entirely.
Variants§
Delete
d — delete.
Yank
y — yank.
Change
c — change (delete + enter Insert mode).
Indent
> — indent.
Outdent
< — outdent.
Uppercase
gU — uppercase.
Lowercase
gu — lowercase.
ToggleCase
g~ — toggle case.
Reflow
gq — reflow / format text.
AutoIndent
= — auto-indent (v1 dumb shiftwidth bracket counting).
Filter
! — filter through external shell command. After the motion fixes the
range the grammar transitions to PendingFilter and waits for the
app to supply a command string before emitting EngineCmd::ApplyFilter.
Comment
gc — toggle line comments on the range. gcc = current line (doubled-
char convention, like dd). gc{motion} = motion variant. All three
visual modes resolve to a row range and call toggle_comment_range.
Trait Implementations§
Source§impl Clone for OperatorKind
impl Clone for OperatorKind
Source§fn clone(&self) -> OperatorKind
fn clone(&self) -> OperatorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OperatorKind
impl Debug for OperatorKind
Source§impl PartialEq for OperatorKind
impl PartialEq for OperatorKind
Source§fn eq(&self, other: &OperatorKind) -> bool
fn eq(&self, other: &OperatorKind) -> bool
self and other values to be equal, and is used by ==.