termcol: OS X Terminal.app, optional PuTTY, SluTTY
[sheet.git] / less.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'less cheat sheet',
5         version => 'v1.1',
6         description => [
7                 "Default bindings of the less pager.",
8                 "Clearly shows how much it's more than more.",
9         ],
10         keywords => [qw'
11                 less sheet cheat keys pager more
12                 shortkey reference keyboard commands options overview
13         '],
14         charset => $sign{charset},
15         stylesheet => [qw'light dark circus mono red terse'],
16         keys => 1,
17 });
18
19 :>
20 <h1>Less cheat sheet</h1>
21
22 <h2>normal pager (default)</h2>
23
24 <:
25 use Shiar_Sheet::Keyboard 2;
26 my $info = do 'less.eng.inc.pl' or die $@;
27 $info->{def} = do 'less.inc.pl';
28 my $keys = Shiar_Sheet::Keyboard->new($info);
29 $keys->map($get{map}) or undef $get{map};
30 $keys->print_rows($get{rows}, [1,0]);
31 :>
32
33 <hr>
34
35 <div class="help">
36         <div class="left">
37                 <dl class="legend legend-types">
38                 <dt class="ci">info
39                         <dd>Temporary message display (or related option).
40                 <dt class="pm">move
41                         <dd>Regular file position panning (or option).
42                 <dt class="po">jump
43                         <dd>Other file position manipulation (").
44                 <dt class="co">search
45                         <dd>Go to matching content (").
46                 <dt class="mo">file
47                         <dd>Alter open file buffer (").
48                 <dt class="mv">misc
49                         <dd>Other commands and options.
50                 </dl>
51         </div>
52
53         <div class="right">
54                 <dl class="legend legend-options">
55                 <dt>key<:= $sign{arg} :>
56                         <dd>Commands with a dot need a char argument afterwards.
57                 <dt class="more">more
58                         <dd>A small subset is compatible with `more`.
59                 </dl>
60
61                 <ul class="legend legend-set">
62                 <li>keyboard <strong>map</strong> is
63                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
64                 <li><strong>ascii</strong> mode is
65                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
66                                 $sign{-ascii} ? 'on' : 'off' :></em>
67                 <li><strong>keys</strong> are
68                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
69                                 !exists $get{keys} && ' by default' :>
70                 <li>default <strong>style</strong> is
71                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
72                 </ul>
73         </div>
74 </div>
75