pub enum Command {
Show 35 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,
ShellEscape,
ColonPrompt,
TagPrompt,
TagPop,
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.
ShellEscape
Enter the !cmd shell-escape prompt.
ColonPrompt
Enter the :colon-command prompt.
TagPrompt
Enter the tag-name prompt (Ctrl-]).
TagPop
Pop the tag stack and jump back (Ctrl-T).
Noop
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.