RewriteEngine on
RewriteBase /
+# serve vim commands when requesting /digraphs.ex as well
+RewriteRule ^(digraphs)\.ex(/.*)?$ $1.vim$2
+
# add .plp if a file exists with .plp appended (topdir only)
RewriteCond %{REQUEST_FILENAME}.plp -f
RewriteRule ^/*([^/]+)(.*) $1.plp$2
td.Xr {background: #EEE} /* reverse */
td.Xa {color: #0A0} /* ascii */
td.Xl {color: #070} /* latin1 */
-td.Xz {color: #D00} /* proposed */
+ .Xz {color: #D00} /* proposed */
td.Lm, td.Mc, td.Me, td.Zl, td.Zp, td.Cs {background: #F00} /* unstyled */
<p>i^k in <a href="/">Vim</a>.
Also see <a href="/unicode">common digraphs</a>.</p>
+<p style="font-size:72%">Unofficial <span class="Xz">proposals</span>
+are available as <a href="/digraphs.vim">ex commands</a>.</p>
+
<:
my $di = do 'digraphs.inc.pl';
--- /dev/null
+<:
+use strict;
+use warnings;
+use open IO => ':utf8';
+
+our $VERSION = '1.0';
+
+$header{content_type} = 'text/plain; charset=us-ascii';
+print '" vim digraph proposals <http://vi.shiar.net/digraphs>', "\n";
+PLP_END { print "\n" };
+
+open my $include, '<', 'shiar.inc.txt' or do {
+ print qq{\n" $_} for '>>> SERVER ERROR <<<', "($!; try again later)";
+ warn $!; # log it as well
+ exit;
+};
+
+my $init = 1;
+for (readline $include) {
+ m{^([!"%'-Z_a-z]{2}) (.)} or next;
+ print "\n:digr" if $init;
+ printf ' %s %d', $1, ord $2;
+}
+continue {
+ # repeat header for next entry if line was empty
+ $init = !m{\S} unless m{^#};
+}
+