From f467c45a5d41e959e438028ab7df4946fab93d30 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 19 May 2018 00:56:12 +0200 Subject: [PATCH] vi: include keys for plugins commentary, lion, surround --- Shiar_Sheet/Keyboard.pm | 2 +- vi.eng.inc.pl | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Shiar_Sheet/Keyboard.pm b/Shiar_Sheet/Keyboard.pm index c627d6d..2ab838e 100644 --- a/Shiar_Sheet/Keyboard.pm +++ b/Shiar_Sheet/Keyboard.pm @@ -120,8 +120,8 @@ sub print_key { } my $keytxt = $self->print_letter($key, $mode); - $keytxt .= $self->{sign}->{$1} while $flags =~ s/(?:^| )(arg[a-ln-z]?)\b//; # arguments $keytxt .= "$self->{sign}->{motion}" if $flags =~ s/ ?\bargm\b//; # motion argument + $keytxt .= $self->{sign}->{$1} while $flags =~ s/(?:^| )(arg[a-ln-z]?)\b//; # arguments my $keyhint = defined($mnem) && qq{ title="$mnem"}; $keytxt = "$keytxt"; $keytxt .= ' '.$desc if defined $desc; diff --git a/vi.eng.inc.pl b/vi.eng.inc.pl index 09a132d..a3146a6 100644 --- a/vi.eng.inc.pl +++ b/vi.eng.inc.pl @@ -138,6 +138,7 @@ key => { 'ga' => "char value\nGet Ascii value", 'g^a'=> "mem usage stats", + 'gc' => "(un)<>com<>ment\ncommentary or tComment plugin", 'gd' => "local declar<>ation", 'gD' => "global declar<>ation", 'ge' => "back to word end", @@ -154,6 +155,8 @@ key => { 'gj' => " screen", 'gJ' => "join leave spac<>ing", 'gk' => " screen", + 'gl' => "align to left\nlion plugin, also good for easy-align", + 'gL' => "align to right\nlion plugin", 'gm' => "cen<>ter screen", 'gn' => "select next find", 'gN' => "select prev find", @@ -364,7 +367,10 @@ key => { 'vg?' => "rot13 encode", 'vg^a'=> "seq. incr<>ement", 'vg^g'=> "count region info", + 'vgc' => "(un)<>com<>ment\ncommentary or tComment plugin", 'vgJ' => "join literal<>ly", + 'vgl' => "align to left\nlion plugin, also good for easy-align", + 'vgL' => "align to right\nlion plugin", 'vgq' => "for<>mat", 'vgw' => "for<>mat still", 'vg^x'=> "seq. decr<>ement", @@ -428,6 +434,7 @@ key => { "i^g\e"=> "insert mode", 'i^gk' => " start col<>umn", 'i^gj' => " start col<>umn", + 'i^gs' => "sur<>round\nsurround plugin", 'i^gu' => "break undo seq<>uence", 'i^gU' => "keep undo seq<>uence", # other i^g keys (even esc) are not recognized @@ -481,6 +488,7 @@ flag => { arg => ["key", "Commands with a dot need a char argument afterwards."], motion => ["key", "Requires a motion afterwards, operates between cursor and destination."], 'v6 new' => ["vim", "Not in original Vi (assessment incomplete)."], + 'xcommentary xlion xsurround ext' => ["plugin", "Optional features provided by common plugins."], }, def => { @@ -630,6 +638,7 @@ def => { 'a' => "g1", '^a'=> "g1", + 'c' => 'g4 argm xcommentary', 'd' => "g2 v6", 'D' => "g2 v6", 'e' => "g2", @@ -646,6 +655,8 @@ def => { 'j' => "g2 v6", 'J' => "g4", 'k' => "g2 v6", + 'l' => 'g3 argm arg xlion', + 'L' => 'g3 argm arg xlion', 'm' => "g2 v6", 'n' => "g8 v7 modev", 'N' => "g8 v7 modev", @@ -925,7 +936,10 @@ def => { '?' => "g4 v6", '^a'=> 'g4 undo v8', '^g' => "g1 vim6", + 'c' => 'g4 xcommentary', 'J' => 'g4 v6', + 'l' => 'g3 arg xlion', + 'L' => 'g3 arg xlion', 'q' => "g4 v6", 'v' => "=gv", 'w' => 'g4 v7', @@ -1028,6 +1042,7 @@ def => { 'k' => 'g2', 'j' => 'g2', + 's' => 'g4 arg xsurround', 'u' => 'g4', 'U' => 'g4 v8', # other keys (even esc) are not recognized -- 2.30.0