From: Mischa POSLAWSKY Date: Mon, 8 Sep 2008 13:35:31 +0000 (+0000) Subject: vim: link i^k to digraph page X-Git-Tag: v1.2~67 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/85e0235b718898b6411ed2eb5d387a2a9d62156b vim: link i^k to digraph page Since it's a bonus feature anyway, do not go to the trouble of making a proper link, but instead just use onclick javascript like for mode switching. --- diff --git a/base.css b/base.css index 00871f7..cfaa433 100644 --- a/base.css +++ b/base.css @@ -113,6 +113,7 @@ ul.keys.ctrl li b small { /* meta key indicator */ .mo[onclick]:hover {background: #F88} .me[onclick]:hover {background: #99F} .mv[onclick]:hover {background: #D9D} +.co[onclick]:hover {background: #EE4} .no { background: #EEE; diff --git a/circus.css b/circus.css index 98d98a8..17fde61 100644 --- a/circus.css +++ b/circus.css @@ -7,6 +7,7 @@ .mv {background: #E8E} /* visual mode */ .me {background: #99F} /* key mode */ +.co[onclick]:hover {background: #000; color: #FF7} .mi[onclick]:hover {background: #000; color: #FFA070} .mo[onclick]:hover {background: #000; color: #F77} .me[onclick]:hover {background: #000; color: #99F} diff --git a/dark.css b/dark.css index 2e05a3a..ddd4fd4 100644 --- a/dark.css +++ b/dark.css @@ -26,6 +26,7 @@ dl.legend-options dt {background: #333} .me {background: #205} /* mode */ .no {background: #222} /* unassigned */ +.co[onclick]:hover, .mi[onclick]:hover, .mo[onclick]:hover, .mv[onclick]:hover, diff --git a/index.plp b/index.plp index 01a3bf2..beb51a1 100644 --- a/index.plp +++ b/index.plp @@ -141,6 +141,8 @@ sub print_key { ' onclick="setmode(%s)"', $1 eq '' ? '' : sprintf(q{'mode%s'}, escapeclass($1)) ); + $onclick .= sprintf(q{ onclick="document.location='%s'"}, $1) + if $flags =~ s/ ?\blink(\S*)//; my $keyhint = defined($mnem) && qq{ title="$mnem"}; print qq{\t\t
  • $keytxt}; diff --git a/vim-cmds.inc.pl b/vim-cmds.inc.pl index ba18a45..bc171da 100644 --- a/vim-cmds.inc.pl +++ b/vim-cmds.inc.pl @@ -504,7 +504,7 @@ i => { '^h' => ["back$sign{_}space", "co"], '^i' => ["tab", "co"], '^j' => ["enter", "co"], - '^k' => ["di$sign{_}graph", "co arg arg vim", "Key code"], + '^k' => ["di$sign{_}graph", "co arg arg vim linkdigraphs.plp", "Key code"], '^l' => ["im leave ins mode", "mo mode vim"], # insertmode only '^m' => ["enter", "co"], '^n' => ["find next keyword", "pm vim"],