X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/f467c45a5d41e959e438028ab7df4946fab93d30..50442220cc52bad55c1003de34f8dada958650d5:/vi.eng.inc.pl diff --git a/vi.eng.inc.pl b/vi.eng.inc.pl index a3146a6..20f70f3 100644 --- a/vi.eng.inc.pl +++ b/vi.eng.inc.pl @@ -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 => { @@ -138,7 +144,6 @@ 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", @@ -155,8 +160,6 @@ 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", @@ -245,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", @@ -342,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", @@ -367,10 +368,7 @@ 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", @@ -434,7 +432,6 @@ 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 @@ -455,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 $_") } qw( g z [ ] )), + 'dW' => 'delete word', + 'db' => 'delete word', + 'dB' => 'delete word', + 'de' => 'delete word e<>nd', + 'dE' => 'delete word e<>nd', + 'df' => 'delete to char<>acter', + 'dF' => 'delete to char<>acter', + 'dG' => 'delete to line<>/eof', + 'dH' => 'delete to top', + 'dj' => 'delete line', + 'dk' => 'delete 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 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 to res<>ult', + 'd`' => 'delete to mark', + "d'" => 'delete lines to m<>ark', + 'd*' => 'delete to find', + 'd#' => 'delete to find', + 'd%' => 'delete to line pct', + 'd^' => 'delete to soft bol', + 'd0' => 'delete to bol', + 'd|' => 'delete to col<>umn', + 'd{' => 'delete par<>agr<>aph', + 'd}' => 'delete rest of p<>ar<>agr<>aph', + 'd(' => 'delete 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 => { @@ -473,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 => { @@ -488,7 +578,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."], + 'xcommentary xlion xsurround xunimpaired ext' => ["plugin", "Optional features provided by common plugins."], }, def => { @@ -535,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", @@ -547,7 +637,7 @@ def => { '^e'=> "g3", 'f' => "g2 arg", 'F' => "g2 arg", - '^f'=> "g2", + '^f'=> "g3", 'g' => "g9 arg modeg", 'G' => "g2", '^g'=> "g1", @@ -675,7 +765,7 @@ def => { 'v' => 'g8 modev', 'V' => "g4", 'w' => "g4 argm v7", - 'x' => "g4 v7", + 'x' => "g4 v7 ext", }, # mode g Z => { @@ -766,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 [ ']' => { @@ -802,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' => { @@ -872,9 +1006,6 @@ def => { '!' => "g4", ':' => "g7 modec", - ',' => "=,", - "'" => "='", - '"' => '="', '<' => "g4", '=' => 'g4 undo', '>' => 'g4', @@ -893,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", @@ -903,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", @@ -920,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 => { @@ -1072,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 },