2013-12-08 19:56:16 +11:00
|
|
|
# less
|
|
|
|
|
2016-10-12 16:58:04 +01:00
|
|
|
> Open a file for interactive reading, allowing scrolling and search.
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Open a file:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
`less {{source_file}}`
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Page up / down:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-09-05 12:27:12 -05:00
|
|
|
`<Space> (next), b (previous)`
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Go to start / end of file:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
|
|
|
`g (start), G (end)`
|
|
|
|
|
2016-03-04 10:33:57 +00:00
|
|
|
- Forward search for a string:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
`/{{something}} then n (next), N (previous)`
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-03-04 10:33:57 +00:00
|
|
|
- Backward search for a string:
|
|
|
|
|
|
|
|
`?{{something}} then n (next), N (previous)`
|
|
|
|
|
2016-05-12 21:49:04 +12:00
|
|
|
- Enable output of ANSI colors:
|
|
|
|
|
|
|
|
`git diff --color | less -R`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Exit:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
|
|
|
`q`
|