Skip to content

Instantly share code, notes, and snippets.

@PostgreSqlStan
Last active April 20, 2022 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PostgreSqlStan/c7b457c04b158ef4c8d30037e75e261f to your computer and use it in GitHub Desktop.
Save PostgreSqlStan/c7b457c04b158ef4c8d30037e75e261f to your computer and use it in GitHub Desktop.
Summary of SUMMARY OF LESS COMMANDS
Summary of SUMMARY OF LESS COMMANDS
-<letter> Toggle a command line option [see OPTIONS below].
<number> Set N by entering number before command.
MOVING
--------------------- -----------------------------------------------------
e j ↓ <return> Forward one line (or N lines).
y k ↑ Backward one line (or N lines).
f <space> Forward one window (or N lines).
b Backward one window (or N lines).
→ Right one half screen width (or N positions).
← Left one half screen width (or N positions).
⌥} Right to last column displayed.
⌥{ Left to first column.
SEARCHING
--------------------- -----------------------------------------------------
/pattern Search forward for (N-th) matching line.
?pattern Search backward for (N-th) matching line.
n Repeat previous search (for N-th occurrence).
N Repeat previous search in reverse direction.
&pattern Display only matching lines
JUMPING
--------------------- -----------------------------------------------------
g Go to first line in file (or line N).
G Go to last line in file (or line N).
p % Go to beginning of file (or N percent into file).
m<letter> Mark the current position with any letter.
'<letter> Go to a previously marked position.
FILES
--------------------- -----------------------------------------------------
:e <file> Examine a new file.
:n Examine (N-th) next file from the command line.
:p Examine (N-th) previous file from the command line.
:x Examine first (or N-th) file from the command line.
:d Delete the current file from the command line list.
= ^G Print current file name.
s <file> Save input to a file.
v Edit the current file with $VISUAL or $EDITOR.
DISPLAY
--------------------- -----------------------------------------------------
r Refresh screen.
R Refresh screen, discarding buffered input.
⌥u Toggle search highlighting.
OPTIONS
--------------------- -----------------------------------------------------
-e Quit at end of file.
-g Highlight only last match for searches.
-G Don't highlight any matches for searches.
-i Ignore case in searches that do not contain uppercase.
-I Ignore case in all searches.
-J Display a status column at left edge of screen.
-m Medium prompt.
-M Long prompt.
-n Use line numbers.
-N Always show line numbers.
-R Raw control characters. (Don't strip ANSI color)
-s Squeeze multiple blank lines.
-S Toggle line wrapping.
-x Set tab stops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment