unicode: one set of barb arrows from unicode 7.0
[sheet.git] / vi.eng.inc.pl
index 09a132d060cf6f7f68695c2ea5d64c1358f95b86..20f70f37158971191fbac2169c7b2b9348c0b2d6 100644 (file)
@@ -1,5 +1,11 @@
 use utf8;
 
+my @motions = qw(
+       g z [ ]
+       b B e E f F G ^h h H j ^j k l L M ^m n N ^n ^p t T w W
+       0 ` ' # $ % ^ * ( ) { } ; / ? + - _ | ,
+);
+
 {
 key => {
 
@@ -242,7 +248,6 @@ key => {
        '[^i'=> "to first occur<>renc<>e",
        '[m' => "start of funct<>ion",
        '[p' => "P reind<>ent<>ed",
-       '[P' => "[p",
        '[s' => "last missp<>ell<>ing",
        '[S' => "last bad word",
        '[z' => "start of open fold",
@@ -339,7 +344,6 @@ key => {
        'vD' => "delete lines",
        'vg' => "extra cmds",
        'v^g'=> "select mode",
-       'v^h'=> "back<>space", # delete in select mode, left otherwise
        'vi' => "extend inner a<>r<>ea",
        'vI' => "insert to block", # block
        'vJ' => "join lines",
@@ -448,6 +452,98 @@ key => {
        'i^x^u' => "cus<>tom comp<>l<>et<>e",
        'i^x^v' => "ex cmd compl<>et<>e",
        'i^x^y' => "window down",
+
+       # plugins
+         'gc' => "(un)<>com<>ment\ncommentary or tComment plugin",
+        'vgc' => "(un)<>com<>ment\ncommentary or tComment plugin",
+         'gl' => "align to left\nlion plugin, also good for easy-align",
+        'vgl' => "align to left\nlion plugin, also good for easy-align",
+         'gL' => "align to right\nlion plugin",
+        'vgL' => "align to right\nlion plugin",
+       'i^gs' => "sur<>round\nsurround plugin",
+
+       # unimpaired
+       '[a' => "prev<>ious file\nunimpaired map for :prev",
+       ']a' => "next file\nunimpaired map for :n",
+       '[A' => "first file\nunimpaired map for :rew",
+       ']A' => "last file\nunimpaired map for :la",
+       '[b' => "prev<>ious buffer\nunimpaired map for :bp",
+       ']b' => "next buffer\nunimpaired map for :bn",
+       '[B' => "first buffer\nunimpaired map for :br",
+       ']B' => "last buffer\nunimpaired map for :bl",
+       '[e' => "exchange line above\nunimpaired plugin",
+       ']e' => "exchange line belo<>w\nunimpaired plugin",
+       '[f' => "preced<>ing file alph<>abet<>ic<>al<>ly\nunimpaired plugin",
+       ']f' => "next file alph<>abet<>ic<>al<>ly\nunimpaired plugin",
+       '[l' => "previous loc<>at<>ion\nunimpaired map for :lp",
+       ']l' => "next loc<>ation\nunimpaired map for :lne",
+       '[L' => "first loc<>ation\nunimpaired map for :lr",
+       ']L' => "last loc<>ation\nunimpaired map for :lla",
+       '[^l'=> "next file in loc<>at<>ions\nunimpaired map for :lpf",
+       ']^l'=> "file back in loc<>at<>ions\nunimpaired map for :lnf",
+       '[n' => "previous conflict<>/hunk\nunimpaired plugin",
+       ']n' => "next confl<>ict<>/hunk\nunimpaired plugin",
+       '[o' => "enable option\nunimpaired plugin",
+       ']o' => "disable option\nunimpaired plugin",
+       'yo' => "toggle option\nunimpaired plugin",
+       '[q' => "previous quickfix\nunimpaired map for :cp",
+       ']q' => "next quickfix error\nunimpaired map for :cn",
+       '[Q' => "first quickfix\nunimpaired map for :cr",
+       ']Q' => "last quickfix error\nunimpaired map for :cla",
+       '[^q'=> "quickfix file b<>ack\nunimpaired map for :cpf",
+       ']^q'=> "next file in q<>uick<>f<>ix\nunimpaired map for :cnf",
+       '[t' => "previous tag\nunimpaired map for :tp",
+       ']t' => "next tag\nunimpaired map for :tn",
+       '[T' => "first tag\nunimpaired map for :tr",
+       ']T' => "last tag\nunimpaired map for :tl",
+       '[u' => "url encode\nunimpaired plugin",
+       ']u' => "url decode\nunimpaired plugin",
+       '[x' => "xml encode\nunimpaired plugin",
+       ']x' => "xml decode\nunimpaired plugin",
+       '[y' => "escape c str<>ing\nunimpaired plugin",
+       ']y' => "unescap<>e c str<>ing\nunimpaired plugin",
+
+       (map { ("d$_" => "delete to <alias>$_") } qw( g z [ ] )),
+       'dW' => 'delete <span style="font-variant:small-caps">word</span>',
+       'db' => 'delete <left> word',
+       'dB' => 'delete <left> <span style="font-variant:small-caps">word</span>',
+       'de' => 'delete word e<>nd',
+       'dE' => 'delete <span style="font-variant:small-caps">word</span> e<>nd',
+       'df' => 'delete to char<>acter',
+       'dF' => 'delete <left> to char<>acter',
+       'dG' => 'delete to line<>/eof',
+       'dH' => 'delete to top',
+       'dj' => 'delete <down> line',
+       'dk' => 'delete <up> line',
+       'dL' => 'delete to bottom',
+       'dM' => 'delete to middle',
+       'dn' => 'delete to next res<>ult',
+       'dN' => 'delete to prev res<>ult',
+       'dt' => 'delete upto ch<>ar<>acter',
+       'dT' => 'delete <left> upto ch<>ar<>acter',
+       'dw' => 'delete word',
+       'd,' => 'delete to prev ch<>ar<>acter',
+       'd;' => 'delete to next ch<>ar<>acter',
+       'd/' => 'delete to res<>ult',
+       'd?' => 'delete <left> to res<>ult',
+       'd`' => 'delete to mark',
+       "d'" => 'delete lines to m<>ark',
+       'd*' => 'delete to find',
+       'd#' => 'delete <left> to find',
+       'd%' => 'delete to line pct',
+       'd^' => 'delete to soft bol',
+       'd0' => 'delete to bol',
+       'd|' => 'delete to col<>umn',
+       'd{' => 'delete <left> par<>agr<>aph',
+       'd}' => 'delete rest of p<>ar<>agr<>aph',
+       'd(' => 'delete <left> senten<>ce',
+       'd)' => 'delete rest of s<>en<>ten<>ce',
+       'da' => 'delete area',
+       'di' => 'delete inner',
+       'dd' => 'delete line',
+       'do' => 'diff obtain',
+       'dp' => 'diff put',
+       'ds' => 'delete surr<>oun<>d<>ing',
 },
 
 mode => {
@@ -466,6 +562,7 @@ mode => {
         i    => "insert mode",
        'i^g' => "extended insert commands (i ctrl-g)",
        'i^x' => "insert completion commands (i ctrl-x)",
+        d    => 'delete motions',
 },
 
 flag => {
@@ -481,6 +578,7 @@ flag => {
        arg => ["key<arg>", "Commands with a dot need a char argument afterwards."],
        motion => ["key<motion>", "Requires a motion afterwards, operates between cursor and destination."],
        'v6 new' => ["vim", "Not in original Vi (assessment incomplete)."],
+       'xcommentary xlion xsurround xunimpaired ext' => ["plugin", "Optional features provided by common plugins."],
 },
 
 def => {
@@ -527,11 +625,11 @@ def => {
                '^a'=> "g4 undo",
                'b' => "g2",
                'B' => "g2",
-               '^b'=> "g2",
+               '^b'=> "g3",
                'c' => "g6 argm undo modei",
                'C' => "g6 undo modei",
                '^c'=> "g4",
-               'd' => "g4 argm undo",
+               'd' => "g4 argm undo moded",
                'D' => "g4 undo",
                '^d'=> "g3",
                'e' => "g2",
@@ -539,7 +637,7 @@ def => {
                '^e'=> "g3",
                'f' => "g2 arg",
                'F' => "g2 arg",
-               '^f'=> "g2",
+               '^f'=> "g3",
                'g' => "g9 arg modeg",
                'G' => "g2",
                '^g'=> "g1",
@@ -630,6 +728,7 @@ def => {
 
                'a' => "g1",
                '^a'=> "g1",
+               'c' => 'g4 argm xcommentary',
                'd' => "g2 v6",
                'D' => "g2 v6",
                'e' => "g2",
@@ -646,6 +745,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",
@@ -664,7 +765,7 @@ def => {
                'v' => 'g8 modev',
                'V' => "g4",
                'w' => "g4 argm v7",
-               'x' => "g4 v7",
+               'x' => "g4 v7 ext",
        }, # mode g
 
        Z => {
@@ -755,10 +856,32 @@ def => {
                '^i'=> 'g3',
                'm' => "g2",
                'p' => "g4",
-               'P' => "g4",
+               'P' => "=[p",
                's' => "g3 v7",
                'S' => "g3 v7",
                'z' => "g2 v6 folding",
+
+               'a' => "g3 xunimpaired",
+               'A' => "g3 xunimpaired",
+               'b' => "g3 xunimpaired",
+               'B' => "g3 xunimpaired",
+               'e' => "g4 xunimpaired",
+               'l' => "g3 xunimpaired",
+               'L' => "g3 xunimpaired",
+               '^l'=> "g3 xunimpaired",
+               '^l'=> "g3 xunimpaired",
+               'f' => "g3 xunimpaired", # overrides native alias
+               'n' => "g3 xunimpaired",
+               'o' => "g9 arg xunimpaired",
+               'q' => "g3 xunimpaired",
+               'Q' => "g3 xunimpaired",
+               '^q'=> "g3 xunimpaired",
+               't' => "g3 xunimpaired",
+               'T' => "g3 xunimpaired",
+               'u' => "g4 argm xunimpaired",
+               'x' => "g4 argm xunimpaired",
+               'y' => "g4 argm xunimpaired",
+               ' ' => "g4 xunimpaired",
        }, # mode [
 
        ']' => {
@@ -791,6 +914,28 @@ def => {
                's' => "g3 v7",
                'S' => "g3 v7",
                'z' => "g2 v6 folding",
+
+               'a' => "g3 xunimpaired",
+               'A' => "g3 xunimpaired",
+               'b' => "g3 xunimpaired",
+               'B' => "g3 xunimpaired",
+               'e' => "g4 xunimpaired",
+               'l' => "g3 xunimpaired",
+               'L' => "g3 xunimpaired",
+               '^l'=> "g3 xunimpaired",
+               '^l'=> "g3 xunimpaired",
+               'f' => "g3 xunimpaired", # overrides native alias
+               'n' => "g3 xunimpaired",
+               'o' => "g9 arg xunimpaired",
+               'q' => "g3 xunimpaired",
+               'Q' => "g3 xunimpaired",
+               '^q'=> "g3 xunimpaired",
+               't' => "g3 xunimpaired",
+               'T' => "g3 xunimpaired",
+               'u' => "g4 argm xunimpaired",
+               'x' => "g4 argm xunimpaired",
+               'y' => "g4 argm xunimpaired",
+               ' ' => "g4 xunimpaired",
        }, # mode ]
 
        '^w' => {
@@ -861,9 +1006,6 @@ def => {
 
                '!' => "g4",
                ':' => "g7 modec",
-               ',' => "=,",
-               "'" => "='",
-               '"' => '="',
                '<' => "g4",
                '=' => 'g4 undo',
                '>' => 'g4',
@@ -882,7 +1024,6 @@ def => {
                'D' => "g4 v6",
                'g' => "g9 arg modevg",
                '^g'=> "g8",
-               '^h'=> 'g4',
                'i' => "g9 modeva arg v6",
                'I' => "g6 modei v6", # block
                'J' => "g4",
@@ -892,10 +1033,8 @@ def => {
                '^o'=> "g8",
                'p' => 'g4',
                'P' => 'g4',
-               '^q'=> "=^q",
                'r' => 'g4 arg',
                'R' => "=vS",  # "might change in future"
-               '^s'=> "=^s",
                's' => "=vc",
                'S' => 'g6 modei v6',
                'u' => "g4 v6",
@@ -909,11 +1048,9 @@ def => {
                'y' => "g4",
                'Y' => "g4",
 
-               map { $_ => "=$_" } qw(
-                       b B ^b ^d e E ^e f F ^f G h H ^i j ^j k l L m M ^m
-                       n N ^n ^p q ^s t T ^u w W ^w ^y z ^z
-                       ` # $ % ^ * ( 0 ) [ { ] } ; / ? + - _ |
-               ) # a lot like normal mode
+               (map { $_ => "=$_" } @motions, qw(
+                       ^b ^d ^e ^f ^i m q ^q ^s ^u ^w ^y z ^z "
+               )), # a lot like normal mode
        }, # mode v
 
        vg => {
@@ -925,7 +1062,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 +1168,7 @@ def => {
 
                'k' => 'g2',
                'j' => 'g2',
+               's' => 'g4 arg xsurround',
                'u' => 'g4',
                'U' => 'g4 v8',
                # other keys (even esc) are not recognized
@@ -1057,6 +1198,35 @@ def => {
                '^y' => "g3",
        }, # mode i ^x
 
+       d => {
+               lead => "d",
+
+               "\e"=> "g7 mode",
+               '^['=> "=\e",
+
+               (map { $_ => 'g4' } @motions),
+               (map { $_ => 'g4 arg' } qw( f F t T ` ' / ? )), # @motions with option
+               (map { $_ => "=v$_" } qw( a i )), # motions from virtual
+               (map { $_ => "=$_" } qw( g z [ ]  \\ ^\\ ^q ^s ^z )),
+
+               'd'  => 'g4',
+               'o'  => 'g5',
+               'p'  => 'g5',
+               's'  => 'g4 arg xsurround',
+
+               'l'  => '=x',
+               'h'  => '=X',
+               '^h' => '=X',
+               '^j' => '=dj',
+               '^m' => '=dj',
+               '^n' => '=dj',
+               '+'  => '=dj',
+               '^p' => '=dk',
+               '-'  => '=dk',
+               '$'  => '=D',
+               '_'  => '=dd',
+       }, # mode d
+
        # TODO: mode/ (command-line)
        # XXX ex mode if you want to go completely wild
 },