4 title => 'vi cheat sheet',
7 "Interactive cheat sheet for vi text editors, notably Vim,",
8 "describing each key in various modes.",
11 vi vim nvi sheet cheat reference overview commands keyboard
13 charset => $sign{charset},
14 stylesheet => [qw'light dark circus mono red terse'],
19 <h1>vi/vim cheat sheet</h1>
21 <h2>normal mode (default)</h2>
26 use Shiar_Sheet::Keyboard 2;
27 my $info = do 'vi.eng.inc.pl' or die $@;
28 $info->{def} = do 'vi.inc.pl';
29 my $keys = Shiar_Sheet::Keyboard->new($info);
30 $keys->map($get{map}) or undef $get{map};
31 $keys->print_rows($get{rows});
40 $keys->print_legend('legend-types', [qw'ci pm po co mi mo mv me']);
46 $keys->print_legend('legend-options', [qw'arg motion', 'ext vim6', 'ext new vim7']);
49 <ul class="legend legend-set">
50 <li>keyboard <strong>map</strong> is
51 <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
52 <li><strong>ascii</strong> mode is
53 <:= defined $sign{-ascii} && 'forced ' :><em><:=
54 $sign{-ascii} ? 'on' : 'off' :></em>
55 <li><strong>keys</strong> are
56 <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
57 !defined $showkeys && ' by default' :>
58 <li>default <strong>style</strong> is
59 <:= defined $get{style} && 'set to ' :><em><:= $style :></em>