5 no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN
6 use open IO => ':utf8';
10 $header{content_type} = 'text/html; charset=utf-8';
12 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
13 "http://www.w3.org/TR/html4/loose.dtd">
17 <title>digraph cheat sheet</title>
18 <meta http-equiv="content-type" content="utf-8">
19 <link rel="stylesheet" type="text/css" media="all" href="/digraphs.css">
55 border: 1px solid #888;
59 background: transparent;
95 <h1>Common uncommon Unicode</h1>
97 <p>i^k in <a href="/">Vim</a>.
98 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
100 <div id="list-common">
103 my $diinfo = do 'digraphs.inc.pl';
104 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
116 my ($width, $digraphs, $rowheads, $colheads) = @_;
121 for my $cell (@$digraphs) {
125 $rows[-1] .= '<th>'.(shift @$rowheads || ' ') if $rowheads;
128 elsif ($cell eq '>') {
133 my $code = join '', map { $di{ord $_} || '' } split //, $cell;
134 my $name = $diinfo->{$code}->[1];
136 if ($cell =~ s/^-//) {
139 elsif ($cell eq '=') {
143 elsif ($cell =~ /[ -~]/) {
149 elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) {
156 $rows[-1] .= sprintf('<td%s%s%s>%s%s',
157 defined $name ? qq{ title="$name"} : '',
158 defined $class ? qq{ class="$class"} : '',
159 $colspan > 1 && qq{ colspan="$colspan"},
160 $cell eq '' ? ' ' : quote($cell),
161 $code ne '' ? sprintf(' <small class="digraph">%s</small>', quote($code))
162 : length($cell) == 1 && $cell !~ /[a-z]/
163 ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
171 unshift @rows, sprintf '<thead><tr><td>%s<tbody>', join '',
172 map { sprintf '<th title="%2$s">%s', split(/:/, $_, 2), '', '' }
176 return sprintf "<table>\n%s</table>\n", join '', map {"<tr>$_\n"} @rows;
179 print "<h2>Common</h2>\n\n";
180 print table(@$_) for (
181 [ 3 => [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}]],
182 [ 3 => [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}]],
183 [ 3 => [qw{. å ä ö ü ß . Å æ ø ű ſ}]],
184 [ 3 => [qw{. ¿ ç ñ é ê è}]],
187 print "<h2>Arrows</h2>\n\n";
188 print table(@$_) for (
189 [ 4 => [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}]],
190 [ 4 => [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}]],
191 [ 3 => [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}]],
192 [ 3 => [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}]],
195 print "<h2>Line drawing</h2>\n\n";
196 print table(@$_) for (
197 [ 4 => [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}]],
198 [ 4 => [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}]],
199 [ 3 => [qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}]],
200 [ 3 => [qw{. ┎ ┰ ┒ . ┠ ╂ ┨ . ┖ ┸ ┚}]],
207 [ 1 => [qw{. ╱ ╳ ╲ }]],
208 [ 4 => [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }]],
209 [ 3 => [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }]],
210 [ 3 => [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }]],
213 print "<h2>Blocks</h2>\n\n";
214 print table(@$_) for (
215 [ 3 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }]],
216 [ 3 => [qw{. ░ . ▒ . ▓ }]],
217 [ 2 => [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }]],
218 [ 2 => [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }]],
219 [ 3 => [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}]],
222 print "<h2>Signs</h2>\n\n";
223 print table(@$_) for (
224 [ 8 => [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]],
225 [ 4 => [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]],
226 [ 5 => [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar
227 [12 => [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac
230 print "<h2>IPA</h2>\n\n";
231 print table(@$_) for (
234 . p p̪ > > t ʈ c k q = ʡ ʔ
235 . b b̪ > > d ɖ ɟ ɡ ɢ = - =
236 . m ɱ > > n ɳ ɲ ŋ ɴ = = =
237 . ʙ - > > r - - = ʀ = -я =
238 . - ⱱ > > ɾ ɽ - = ɢ̆ = - =
239 . ɸ f θ s ʃ ʂ ç x χ ħ ʜ h
240 . β v ð z ʒ ʐ ʝ ɣ ʁ ʕ ʢ ɦ
241 . = = > > ɬ - - - - = = =
242 . = = > > ɮ - - - - = = =
243 . - ʋ > > ɹ ɻ j ɰ - - - =
244 . = = > > l ɭ ʎ ʟ - = = =
245 . ʘ - ǀ ǁ ǃ -‼ ǂ - - = = =
246 . ɓ ɗ̪ > > ɗ -ᶑ ʄ ɠ ʛ = = =
257 'Voiced lateral fricative',
259 'Lateral approximant',
264 qw'BiL:Bilabial LD:Labiodental D:Dental Alv:Alveolar PA:Postalveolar Rf:Retroflex Pal:Palatal Vel:Velar Uv:Uvular Ph:Pharyngeal EG:Epiglottal Gl:Glottal',
277 [qw{Close Near-close Close-mid Mid Open-mid Near-open Open}],
278 [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}]
282 print "<h2>Alphabetics</h2>\n\n";
284 [ map { ('.', split //, $_->[1]) } @$_ ],
285 [ map { $_->[0] } @$_ ],
287 [Latin => 'aīıęôɳŋṡšđðƷ'],
288 [Cyrillic => 'аійэёнњшщчьЯ'],
289 [Greek => 'αίϊηϋπψσςθξΩ'],
290 [Hebrew => 'אײיעונןסשטצץ'],
293 print "<h2>Japanese</h2>\n\n";
294 print table(@$_) for (
308 ['', qw{K S T N H M Y R W}],
335 ['', qw{K S T N H M Y R W}],
355 <a href="http://vi.shiar.net/unicode">vi.<strong>shiar.net</strong>/unicode</a>
356 <a href="git://dev.shiar.net/vi-cheat"><:= "v$VERSION" :></a>
358 <a title="Licensed under the GNU Affero General Public License, version 3"
359 href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a> •
361 use Time::Format qw(time_format);
362 print time_format('yyyy-mm-dd', (stat $ENV{SCRIPT_FILENAME})[9]);