digraphs: verbose option to show inverted mnemonics
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 22 Feb 2015 20:07:43 +0000 (21:07 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000 (05:43 +0200)
digraphs.plp

index 2b3446bd329affdba8f8fc603c83bd6c89f373f7..72af1bee70461fcf10fcf873ba974fae278e65b4 100644 (file)
@@ -32,6 +32,13 @@ are available as <a href="/digraphs.vim">ex commands</a>.</p>
 my $di = do 'digraphs.inc.pl'
        or die "Error loading digraphs data: ", $@ // $!;
 
 my $di = do 'digraphs.inc.pl'
        or die "Error loading digraphs data: ", $@ // $!;
 
+if (exists $get{v}) {
+       # show characters for inverted mnemonics (vim alternatives)
+       $di->{ substr($_, 1, 1) . substr($_, 0, 1) } ||=
+               [$di->{$_}->[0], '', 'l0 ex']
+               for grep { ref $di->{$_} } keys %{$di};
+}
+
 my @chars = (
        [qw{! " % ' ( ) * + , - . /}],
        ['0'..'9'], [qw{: ; < = > ?}],
 my @chars = (
        [qw{! " % ' ( ) * + , - . /}],
        ['0'..'9'], [qw{: ; < = > ?}],