tldr/pages/common/less.md
Eric Nielsen b6b26e345d less, more: Don't use ...then... in examples
Instead, explain additional keystrokes in the example title. See
ee1472e76f (r82836295)

Also, change order of examples to down/up, end/start and next/previous
to keep consistency.
2016-10-13 12:30:52 +05:30

32 lines
483 B
Markdown

# less
> Open a file for interactive reading, allowing scrolling and search.
- Open a file:
`less {{source_file}}`
- Page down / up:
`<Space> (down), b (up)`
- Go to end / start of file:
`G (end), g (start)`
- Forward search for a string (press `n`/`N` to go to next/previous match):
`/{{something}}`
- Backward search for a string (press `n`/`N` to go to next/previous match):
`?{{something}}`
- Enable output of ANSI colors:
`git diff --color | less -R`
- Exit:
`q`