readline: force escape row display regardless of visible modes
[sheet.git] / vimperator.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'vimperator cheat sheet',
5         version => 'v1.2',
6         description => [
7                 "Interactive cheat sheet for the Vimperator Firefox extension,",
8                 "describing the function of each key.",
9         ],
10         keywords => [qw'
11                 vimperator firefox vim iceweasel sheet cheat reference overview
12                 commands keyboard browser
13         '],
14         charset => $sign{charset},
15         stylesheet => [qw'light dark circus mono red terse'],
16         keys => 1,
17 });
18
19 :>
20 <h1>Vimperator cheat sheet</h1>
21
22 <h2>normal mode (default)</h2>
23
24 <:
25 use Shiar_Sheet::Keyboard 2;
26 my $info = do 'vimperator.eng.inc.pl' or die $@;
27 $info->{def} = do 'vimperator.inc.pl';
28 $_->{"\e"} = ['mv mode', "normal mode"] for values %{ $info->{def} };
29 delete $info->{def}->{''}->{"\e"};
30 my $keys = Shiar_Sheet::Keyboard->new($info);
31 $keys->map($get{map}) or undef $get{map};
32 $keys->print_rows($get{rows});
33 :>
34
35 <hr>
36
37 <div class="help">
38         <div class="left">
39                 <dl class="legend legend-types">
40                 <dt class="ci">info
41                         <dd>Displays something without any permanent consequences.
42                 <dt class="pm">motion
43                         <dd>Move cursor, scroll window, focus buffer element.
44                 <dt class="po">tab
45                         <dd>Tab or window navigation/selection.
46                 <dt class="co">buffer
47                         <dd>Page interaction.
48                 <dt class="cp">open
49                         <dd>Browse to a location in the current tab.
50                 <dt class="mi">tab open
51                         <dd>Browse somewhere in a new tab.
52                 <dt class="mo">browser
53                         <dd>Other browser action.
54                 <dt class="mv">mode
55                         <dd>Enter a different mode.
56                 <dt class="me">key cmd
57                         <dd>Additional key commands (click for overview).
58                 </dl>
59         </div>
60
61         <div class="right">
62                 <dl class="legend legend-options">
63                 <dt>key<:= $sign{arg} :>
64                         <dd>Commands with a dot need a char argument afterwards.
65                 <dt>key<:= $sign{args} :>
66                         <dd>Commands with two dots require variable arguments afterwards.
67                 </dl>
68
69                 <ul class="legend legend-set">
70                 <li>keyboard <strong>map</strong> is
71                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
72                 <li><strong>ascii</strong> mode is
73                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
74                                 $sign{-ascii} ? 'on' : 'off' :></em>
75                 <li><strong>keys</strong> are
76                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
77                                 !exists $get{keys} && ' by default' :>
78                 <li>default <strong>style</strong> is
79                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
80                 </ul>
81         </div>
82 </div>
83