Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'less is more' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
less is more
Authored by: osxpez on Apr 01, '02 03:18:45PM

The tip about changing your systems default pager to less is a really good one. To hint about reading the man page for less makes it even better. But I can offer a few of my favs.

<ul>
<li>G (move to end of file)</li>
<li>nG (move to line n)</li>
<li>mb (set mark b [a-z])</li>
<li>'b (move to mark b)</li>
<li>ctrl-d (move half page down)</li>
<li>ctrl-u (move half page up)</li>
<li>ctrl-g (gives some file info including where you are)</li>
<li>/ (forward regexp search)</li>
<li>? (backward regexp search)</li>
<li>n (find next occurance of regexp in the same direction as last / or ?)</li>
<li>N (find next occurance of regexp in opposite direction as last / or ?)</li>
<li>q (quits)</li>
</ul>

The "mark" commands works like that you first press "m" then a letter between a nd z inclusive. Let's say you press "ma". Then you can move to the "a" mark by pressing "'a".



[ Reply to This | # ]
less is more
Authored by: Willfon on Apr 05, '02 08:45:55AM
more or less...
anyways, here are some environment variables I have set that makes man use less:

PAGER=less
LESS=-seP?f%f .?ltline %lt:byte %bb?s of %s..?e, (END)?x - Next: %x.:?pb, %pb%.. (h gives help)
LESSCHARSET=latin1

But it should be noted that this will make less cat the text man'ed to the last text viewed with less; the buffer is not cleaned.

--
Willfon


[ Reply to This | # ]