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 => {
'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",
'gj' => "<down> screen",
'gJ' => "join leave spac<>ing",
'gk' => "<up> 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",
'[^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",
'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",
'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",
"i^g\e"=> "insert mode",
'i^gk' => "<up> start col<>umn",
'i^gj' => "<down> 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
'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 => {
i => "insert mode",
'i^g' => "extended insert commands (i ctrl-g)",
'i^x' => "insert completion commands (i ctrl-x)",
+ d => 'delete motions',
},
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 ext' => ["plugin", "Optional features provided by common plugins."],
+ 'xcommentary xlion xsurround xunimpaired ext' => ["plugin", "Optional features provided by common plugins."],
},
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",
'^e'=> "g3",
'f' => "g2 arg",
'F' => "g2 arg",
- '^f'=> "g2",
+ '^f'=> "g3",
'g' => "g9 arg modeg",
'G' => "g2",
'^g'=> "g1",
'v' => 'g8 modev',
'V' => "g4",
'w' => "g4 argm v7",
- 'x' => "g4 v7",
+ 'x' => "g4 v7 ext",
}, # mode g
Z => {
'^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 [
']' => {
'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' => {
'!' => "g4",
':' => "g7 modec",
- ',' => "=,",
- "'" => "='",
- '"' => '="',
'<' => "g4",
'=' => 'g4 undo',
'>' => 'g4',
'D' => "g4 v6",
'g' => "g9 arg modevg",
'^g'=> "g8",
- '^h'=> 'g4',
'i' => "g9 modeva arg v6",
'I' => "g6 modei v6", # block
'J' => "g4",
'^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",
'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 => {
'^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
},