Searching
-I, --IGNORE-CASE: Case insensitive search
-i, --ignore-case: Case insensitive search unless uppercase characters are found in the search pattern
-jX, --jump-target=X: with X a number: Show search result X lines from the top of the screen
-J, --status-column: Place * on lines with search results
Quitting
-e, --quit-at-eof: Exits less when reached end twice
-E, --QUIT-AT-EOF: Exits less when first reached end
-F, --quit-if-one-screen: Exits when output is less than 1 page
-~, --tilde: Lines after end of file are blank, not ~
Moving around
Syntax used:
xp: Triggers for any number x followed by p.
xp: Also triggers when just pressing p.
- Omitted: Many keys can be combined with
Control for the same effect.
Going down
xe, xj, xENTER: Forward one line or x lines if x is provided
xd: Forward half a page. If x is specified it becomes the new default for d
xPgDwn, xSPACE, xf: Forward a page. x is optional, if provided it sets the size of the page (once)
xz: Sets the size of x as the page size (in lines) for all subsequent calls of f, SPACE and PgDwn
G, >: Forward to the end
Going up
xy, xk, CONTROL + P: Backward one line or x lines if x is provided
xu: Backward half a page. If x is specified it becomes the new default for u
xPgUp, xb, ESC + V: Backward a page. x is optional, if provided it sets the size of the page (once)
xw: Sets the size of x as the page size (in lines) for all subsequent calls of b, PgUp
g, <: Backward to the beginning
Searching
See searching parameters above for configuring case sensitivity.
/: Search down for text or regex
?: Search up
n: Goto next match
N: Goto previous match
&: Search and show only the matching lines
Other
s + filename: Save to file and inspect with your weapon of choice
(, ), {, }, [, ]: When the character pressed is on top of the page, scroll to its counterpart
xp, x%: Go to x% position in document
Marking:
mx: With x any character. Mark this position as x.
'x: Goto the position marked as x
Quitting
ESC, SPACE: ESC followed by SPACE: continue scrolling after end of stream
q, Q, :q, :Q, ZZ: Exit less
CONTROL + l: Clear screen afterwards?
Summary
After a few years of just using PgUp and PgDown I guess this research was way overdue.