pub enum LastChange {
Show 17 variants
OpMotion {
op: Operator,
motion: Motion,
count: usize,
inserted: Option<String>,
},
OpTextObj {
op: Operator,
obj: TextObject,
inner: bool,
inserted: Option<String>,
},
LineOp {
op: Operator,
count: usize,
inserted: Option<String>,
register: Option<char>,
},
CharDel {
forward: bool,
count: usize,
},
ReplaceChar {
ch: char,
count: usize,
},
ToggleCase {
count: usize,
},
JoinLine {
count: usize,
},
Paste {
before: bool,
count: usize,
cursor_after: bool,
reindent: bool,
},
DeleteToEol {
inserted: Option<String>,
},
OpenLine {
above: bool,
inserted: String,
},
InsertAt {
entry: InsertEntry,
inserted: String,
count: usize,
},
GnOp {
op: Operator,
forward: bool,
inserted: Option<String>,
},
ReplaceMode {
text: String,
},
VisualOp {
op: Operator,
extent: VisualExtent,
inserted: Option<String>,
},
VisualReplace {
ch: char,
extent: VisualExtent,
},
VisualBlockReplace {
ch: char,
rows: usize,
cols: usize,
to_eol: bool,
},
VisualBlockInsert {
text: String,
rows: usize,
cols: usize,
to_eol: bool,
append: bool,
},
}Expand description
Information needed to replay a mutating change via ..
Variants§
OpMotion
Operator over a motion.
OpTextObj
Operator over a text-object.
LineOp
dd, cc, yy with a count.
Fields
CharDel
x, X with a count.
ReplaceChar
r<ch> with a count.
ToggleCase
~ with a count.
JoinLine
J with a count.
Paste
p / P (and gp/gP, ]p/[p) with a count.
Fields
DeleteToEol
D (delete to EOL).
OpenLine
o / O + the inserted text.
InsertAt
i/I/a/A + inserted text.
GnOp
dgn / cgn (and gN forms) — operate on the next search match.
inserted is filled on Esc for the cgn change form so . retypes it.
ReplaceMode
R{text}<Esc> — replace (overstrike) mode. . re-overtypes text.
VisualOp
A visual-mode operator (v/V + d/c/</>/~/u/U/?).
vim (:h v_.) replays over a same-SIZE region anchored at the
current cursor rather than the original absolute range — extent
captures that size. inserted is filled on Esc for the c form so
. retypes it (same AfterChange patch site as OpMotion /
OpTextObj / LineOp).
d / c / ~/u/U/g? from Visual — charwise, linewise, AND
blockwise (VisualExtent::Block). Block c fills inserted at its
own BlockChange finish site (comment.rs), mirroring the charwise
AfterChange patch.
VisualReplace
Charwise (v) / linewise (V) r{ch} — dot-repeat re-replaces a
same-SIZE region anchored at the cursor (:h v_.), mirroring
VisualBlockReplace for the block case. r has no Operator, so it
rides its own variant instead of VisualOp. extent is a
VisualExtent::Char or VisualExtent::Line captured from the live
selection.
VisualBlockReplace
Visual-BLOCK r{ch} — dot-repeat re-replaces a same-size rectangle
anchored TOP-LEFT at the cursor. r has no Operator, so it rides
its own variant instead of VisualOp. to_eol preserves a $-ragged
right edge (:h v_b_$).
VisualBlockInsert
Visual-BLOCK I / A — dot-repeat re-inserts text at the block’s
left (append == false) or right (append == true) edge over a
same-size rectangle anchored TOP-LEFT at the cursor. cols is the
block width (A appends cols columns past the cursor); to_eol
preserves a $-ragged right edge (A only, :h v_b_$).
Trait Implementations§
Source§impl Clone for LastChange
impl Clone for LastChange
Source§fn clone(&self) -> LastChange
fn clone(&self) -> LastChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more