keys: replace omni-present escape keys
[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 <ul id="rows">
25
26 <:
27 use Shiar_Sheet::Keyboard 2;
28 my $info = do 'less.eng.inc.pl' or die $@;
29 $info->{def} = do 'less.inc.pl';
30 my $keys = Shiar_Sheet::Keyboard->new($info);
31 $keys->map($get{map}) or undef $get{map};
32 $keys->print_rows($get{rows}, [1,0]);
33 :>
34 </ul>
35
36 <hr>
37
38 <div class="help">
39         <div class="left">
40                 <dl class="legend legend-types">
41                 <dt class="ci">info
42                         <dd>Temporary message display (or related option).
43                 <dt class="pm">move
44                         <dd>Regular file position panning (or option).
45                 <dt class="po">jump
46                         <dd>Other file position manipulation (").
47                 <dt class="co">search
48                         <dd>Go to matching content (").
49                 <dt class="mo">file
50                         <dd>Alter open file buffer (").
51                 <dt class="mv">misc
52                         <dd>Other commands and options.
53                 </dl>
54         </div>
55
56         <div class="right">
57                 <dl class="legend legend-options">
58                 <dt>key<:= $sign{arg} :>
59                         <dd>Commands with a dot need a char argument afterwards.
60                 <dt class="more">more
61                         <dd>A small subset is compatible with `more`.
62                 </dl>
63
64                 <ul class="legend legend-set">
65                 <li>keyboard <strong>map</strong> is
66                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
67                 <li><strong>ascii</strong> mode is
68                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
69                                 $sign{-ascii} ? 'on' : 'off' :></em>
70                 <li><strong>keys</strong> are
71                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
72                                 !exists $get{keys} && ' by default' :>
73                 <li>default <strong>style</strong> is
74                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
75                 </ul>
76         </div>
77 </div>
78