Skip to main content

Action

Enum Action 

Source
pub enum Action {
Show 17 variants Repeat, SelectObject { scope: TextObjectScope, kind: TextObjectKind, }, Move(Motion), Operate { operator: Operator, target: EditTarget, }, Insert(InsertStyle), ReplaceChar(char), DeleteChars { backward: bool, }, Paste { before: bool, }, ToggleCase, Join { spaces: bool, }, Visual(Shape), SwapVisual, Reselect, History(HistoryCommand), Target(TargetRequest), Host(HostCommand), BlockInsert { append: bool, },
}
Expand description

Semantic command retained for repeat independently of key mappings.

Variants§

§

Repeat

Replay the last successful change. An explicit count replaces its original count.

§

SelectObject

Select a text object using the requested boundaries.

Fields

§scope: TextObjectScope

Whether to include adjacent whitespace or delimiters.

§kind: TextObjectKind

Object family to resolve at the cursor.

§

Move(Motion)

Move the cursor, extending the anchor when Visual mode is active.

§

Operate

Resolve a target and then apply an editing operator to it.

Fields

§operator: Operator

Operation to perform once the target is known.

§target: EditTarget

Motion, object, selection or host service that defines the range.

§

Insert(InsertStyle)

Begin an Insert or Replace transaction at the requested position.

§

ReplaceChar(char)

Replace selected graphemes with the supplied character (r).

§

DeleteChars

Delete graphemes on the current line (x or X).

Fields

§backward: bool

Delete preceding graphemes when true.

§

Paste

Put the unnamed register using its recorded selection shape.

Fields

§before: bool

Insert before the cursor or line when true (P).

§

ToggleCase

Toggle case at the cursor or over the selection (~).

§

Join

Join logical lines, including those covered by a Visual selection.

Fields

§spaces: bool

Use Vim’s whitespace adjustment for J, or preserve spacing for gJ.

§

Visual(Shape)

Enter, switch or toggle the requested Visual shape.

§

SwapVisual

Exchange the active cursor and selection anchor (o).

§

Reselect

Restore the previous Visual selection (gv).

§

History(HistoryCommand)

Request a change to host-owned undo history.

§

Target(TargetRequest)

Move or extend a selection to a host-resolved destination.

§

Host(HostCommand)

Dispatch a host-defined semantic action.

§

BlockInsert

Insert on the rows covered by a Visual block.

Fields

§append: bool

Append at the far edge of the block when true (A).

Trait Implementations§

Source§

impl Clone for Action

Source§

fn clone(&self) -> Self

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 Action

Source§

impl Debug for Action

Source§

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

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

impl Eq for Action

Source§

impl PartialEq for Action

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Action

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.