-<title>vi cheat sheet</title>
-<meta http-equiv="content-type" content="<:= $ctype :>">
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- my %styles = map {$_ => $_} qw(dark circus mono terse);
- our $style = exists $get{style} && $styles{$get{style}} || "light";
- printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
- $_ eq $style ? "stylesheet" : "alternate stylesheet", "$_.css", $_
- ) for keys %styles;
-
- our $showkeys = exists $get{keys} && $get{keys} ne "0";
- print "\n<style> .no {visibility:hidden} </style>" unless $showkeys;
- print "\n<style> .no, .alias {opacity:.5} </style>"
- if $showkeys and $get{keys} eq "ghost";
-:>
-
-<script><!--
-function setmode(classname) {
- // set style for each #rows>li>ul>li to display:none unless it matches classname
- var showclass = classname ? ' '+classname+'(?!\\w)' : '^$';
- var parentskip = /^keys/;
- var row = document.getElementById('rows').firstChild;
- do {
- if (row.tagName == 'LI' && row.firstChild.tagName == 'UL'
- && !row.firstChild.className.match(parentskip)) {
- var el = row.firstChild.firstChild;
- if (el) do {
- if (el.tagName == 'LI') {
- el.style.display = el.className.match(showclass) ? 'block' : 'none';
- }
- } while (el = el.nextSibling);
- }
- } while (row = row.nextSibling);
-
- // update H2 to reflect the first part of a currently active (but hidden) H3
- var h3s = document.getElementsByTagName('H3');
- for (var i = 0; i < h3s.length; i++) {
- if (h3s[i].parentNode.style.display != 'block') continue;
- document.getElementsByTagName('H2')[0].innerHTML = h3s[i].firstChild.data;
- }
-} // setmode
-//--></script>
-
-<body>
-
-<h1>vi/vim cheat sheet</h1>
-
-<h2>normal mode (default)</h2>
-
-<ul id="rows">
-
-<li class="row">
- <ul class="keys omni">
- <li class="mo" onclick="setmode()"><b>Esc</b> normal mode
- <!-- not as static anymore, but never bothered; just see ^[ -->
- </ul>
-</li>
-
-<:
-our %sign = (
- arg => $ascii ? "." : "·", # described as 'dot'
- motion => $ascii ? "|" : "↕",
- alias => $ascii ? "see: " : "»",
- up => $ascii ? "up" : "▲",
- right => $ascii ? "right" : "▶",
- down => $ascii ? "down" : "▼",
- left => $ascii ? "left" : "◀",
- sep => $ascii ? "*" : "•",
- _ => exists $get{ascii} && !$ascii ? "\x{200b}" : "<wbr>",
- # use the correct ZWNJ only when unicode is forced on
- # default to use unofficial html for best support
-);
-
-my %keys = do "vim-cmds.inc.pl";
-
-my @casedesc = qw(ctrl shift);
-my @rowdesc = qw(numeric top home bottom);
-my %keyrows = do "vim-keys.inc.pl";