Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 31 variants ScrollLines(i64), ScrollLogicalLines(i64), PageDown, PageUp, HalfPageDown, HalfPageUp, Quit, Resize(u16, u16), Refresh, ToggleLineNumbers, ToggleChop, ToggleFollow, SearchForward, SearchBackward, NextMatch, PreviousMatch, OptionPrefix, Reload, TogglePrettify, SetPrettifyMode(PrettifyMode), RedetectPrettify, Digit(u8), GotoLine, GotoRecord, GotoPercent, Cancel, MarkSet, MarkJump, CtrlXPrefix, JumpPrevious, Noop,
}

Variants§

§

ScrollLines(i64)

§

ScrollLogicalLines(i64)

J / K — jump forward or backward by one whole logical line, skipping any remaining wrap rows of the current line. Useful for long lines that wrap many screen rows.

§

PageDown

§

PageUp

§

HalfPageDown

§

HalfPageUp

§

Quit

§

Resize(u16, u16)

§

Refresh

§

ToggleLineNumbers

§

ToggleChop

§

ToggleFollow

§

SearchForward

/ — open the forward-search prompt.

§

SearchBackward

? — open the backward-search prompt.

§

NextMatch

n — repeat the last search in its original direction.

§

PreviousMatch

N — repeat the last search in the opposite direction.

§

OptionPrefix

- — option-toggle prefix: the next key chooses an option to flip (N → line numbers, S → chop, F → follow).

§

Reload

R — force-reload the source from disk now (only meaningful with --live; no-op for static file sources and append-streaming follow).

§

TogglePrettify

Shift-P — toggle pretty-printing on/off (cycles back to the last active mode if currently off).

§

SetPrettifyMode(PrettifyMode)

Set a specific prettify mode (issued by the -P<letter> sub-prefix after the user picks j/y/t/x/h/c).

§

RedetectPrettify

Re-run byte-based content detection and apply the result (-Pa).

§

Digit(u8)

A digit (0-9) was pressed. The app accumulates these into a numeric prefix that the next non-digit command consumes.

§

GotoLine

Jump to physical line N (1-indexed). Without a prefix, behaves as goto-top.

§

GotoRecord

Jump to record N (1-indexed). Without a prefix, behaves as goto-bottom (preserves the existing bare-G behavior).

§

GotoPercent

Jump to N percent through the file by bytes. Without a prefix, behaves as goto-top.

§

Cancel

Cancel any pending numeric prefix without firing a command.

§

MarkSet

First half of a set-mark sequence (the m key). The next keystroke names the mark.

§

MarkJump

First half of a jump-to-mark sequence (the ' key). The next keystroke names the mark.

§

CtrlXPrefix

First half of the Ctrl-X Ctrl-X jump-to-previous-position chord. The next keystroke must also be Ctrl-X.

§

JumpPrevious

Jump to the previous position (Ctrl-X Ctrl-X in less). Dispatched from the CtrlXPending mode intercept in app.rs.

§

Noop

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

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 Debug for Command

Source§

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

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

impl PartialEq for Command

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Command

Source§

impl StructuralPartialEq for Command

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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 = 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.