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 <ul class="keys omni">
27 <li class="mo chr27" onclick="setmode()"><b>Esc</b> normal mode
28 <!-- not as static anymore, but never bothered; just see ^[ -->
33 use Shiar_Sheet::Keyboard 2;
34 my $info = do 'vi.eng.inc.pl' or die $@;
35 $info->{def} = do 'vi.inc.pl';
36 my $keys = Shiar_Sheet::Keyboard->new($info);
37 $keys->map($get{map}) or undef $get{map};
38 $keys->print_rows($get{rows});
47 $keys->print_legend('legend-types', [qw'ci pm po co mi mo mv me']);
53 $keys->print_legend('legend-options', [qw'arg motion', 'ext vim6', 'ext new vim7']);
56 <ul class="legend legend-set">
57 <li>keyboard <strong>map</strong> is
58 <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
59 <li><strong>ascii</strong> mode is
60 <:= defined $sign{-ascii} && 'forced ' :><em><:=
61 $sign{-ascii} ? 'on' : 'off' :></em>
62 <li><strong>keys</strong> are
63 <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
64 !defined $showkeys && ' by default' :>
65 <li>default <strong>style</strong> is
66 <:= defined $get{style} && 'set to ' :><em><:= $style :></em>