X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/eeaaa3c862485faf9f26c5646b2c9e94d03657ab..77ac3d52d89913a79cca834d882c54a58c15a488:/less.eng.inc.pl diff --git a/less.eng.inc.pl b/less.eng.inc.pl index 99c0545..fed0bd2 100644 --- a/less.eng.inc.pl +++ b/less.eng.inc.pl @@ -1,106 +1,113 @@ use utf8; + { +# less v418 key => { - 'b' => ["page up"], - 'd' => ['scroll down'], - 'f' => ["page down"], - 'F' => ["follow", 'Forward Forever'], - 'g' => ["(first) line"], - 'G' => ["last line"], - 'h' => ["help"], - 'j' => [$sign{down}], - 'k' => [$sign{up}], - 'm' => ["mark pos$sign{_}ition"], - 'n' => ["next find"], - 'N' => ["prev find"], - 'p' => ["reset position", 'beginning or Percentage'], - 'q' => ["quit"], - 'r' => ["redraw"], - 'R' => ["refresh"], - 's' => ["save to file"], - 't' => ["next tag"], - 'T' => ["prev tag"], - 'u' => ['scroll up'], - 'v' => ["edit"], - 'V' => ["version"], - 'w' => ["page up and set window"], - '^x'=> ["emacs aliases"], - 'z' => ["set page down"], - - '!' => ["shell command"], - '|' => ["pipe till mark"], - ':' => ["com$sign{_}mand"], - '/' => ["find"], - '?' => ["find rev."], - '&' => ["filter match$sign{_}es"], - "'" => ["goto mark"], - '-' => ["toggle option"], - '_' => ["show option"], - '=' => ["file name"], - '+' => ["initial cmd"], - - '(' => ["closing"], - - '^[n' => ["any next find"], - '^[N' => ["any prev find"], - '^[u' => ["mark search", 'Undo'], - '^[(' => ["scroll left"], - '^[)' => ["scroll right"], - - ':d' => ["drop file"], - ':e' => ["open file"], - ':n' => ["next file"], - ':p' => ["prev file"], - ':x' => ["first file"], - - '-a' => ["advance find page"], - '-b' => ["buffer space"], - '-B' => ["static buffer for pipes"], - '-c' => ["clear on scroll"], - '-d' => ["dumb term$sign{_}inal"], - '-D' => ["dos colours"], - '-e' => ["exit after eof"], - '-E' => ["exit at eof"], - '-f' => ["force open"], - '-F' => ["exit if 1 page"], - '-g' => ["hilight last match"], - '-h' => ["scroll back limit"], - '-i' => ["ignore lower$sign{_}c$sign{_}ase"], - '-I' => ["ignore case"], - '-j' => ["top offset"], - '-J' => ["status column"], - '-k' => ["key bind$sign{_}ing$sign{_}s"], - '-L' => [qq[ignore lesso$sign{_}pen filter]], - '-m' => ["med. promp$sign{_}t tog$sign{_}gle"], - '-M' => ["long promp$sign{_}t tog$sign{_}gle"], - '-n' => ["count line num$sign{_}ber$sign{_}s"], - '-N' => ["show line n$sign{_}um$sign{_}ber$sign{_}s"], - '-o' => ["stdin to log"], - '-O' => ["log overwrite"], - '-p' => ["initial search"], - '-P' => ["status line", "Prompt"], - '-q' => ["no info bell", "Quiet"], - '-Q' => ["no warn bell", "Quiet!"], - '-r' => ["raw chars"], - '-R' => ["ansi chars"], - '-s' => ["squeeze blank lines"], - '-S' => ["no line wrap"], - '-t' => ["find tag"], - '-T' => ["tags file"], - '-u' => ['parse \b \r'], - '-U' => ['escape \t \b \r'], - '-w' => ["hilight page d$sign{_}own"], - '-W' => ["hilight forw$sign{_}ard"], - '-x' => ["tab stops"], - '-X' => ["no termcap init"], - '-y' => ["scroll limit fw$sign{_}d"], - '-z' => ["page size"], - '-"' => ["shell quotes"], - '-~' => ["outside tildes toggle"], - '-#' => ["col shift"], - '--' => ["option name"], - '-+' => ["reset option"], + "\e"=> "alt<>/meta", + + 'b' => "page up", + 'd' => 'scroll down', + 'f' => "page down", + 'F' => "follow\nForward Forever", + 'g' => "(first) line", + 'G' => "last line", + 'h' => "help", + 'j' => "", + 'k' => "", + 'm' => "mark pos<>ition", + 'n' => "next find", + 'N' => "prev find", + 'p' => "reset position\nbeginning or Percentage", + 'q' => "quit", + 'r' => "redraw", + 'R' => "refresh", + 's' => "save to file", + 't' => "next tag", + 'T' => "prev tag", + 'u' => 'scroll up', + 'v' => "edit", + 'V' => "version", + 'w' => "page up and set window", + '^x'=> "emacs aliases", + 'z' => "set page down", + + '!' => "shell command", + '|' => "pipe till mark", + ':' => "com<>mand", + '/' => "find", + '?' => "find rev.", + '&' => "filter match<>es", + "'" => "goto mark", + '-' => "toggle option", + '_' => "show option", + '=' => "file name", + '+' => "initial cmd", + + '(' => "closing", + + "^[\e"=> "noop", + '^[n' => "any next find", + '^[N' => "any prev find", + '^[u' => "mark search\nUndo", + '^[(' => "scroll left", + '^[)' => "scroll right", + + ":\e"=> "noop", + ':d' => "drop file", + ':e' => "open file", + ':n' => "next file", + ':p' => "prev file", + ':x' => "first file", + + "-\e"=> "noop", + '-a' => "advance find page", + '-b' => "buffer space", + '-B' => "static buffer for pipes", + '-c' => "clear on scroll", + '-d' => "dumb term<>inal", + '-D' => "dos colours", + '-e' => "exit after eof", + '-E' => "exit at eof", + '-f' => "force open", + '-F' => "exit if 1 page", + '-g' => "hilight last match", + '-h' => "scroll back limit", + '-i' => "ignore lower<>c<>ase", + '-I' => "ignore case", + '-j' => "top offset", + '-J' => "status column", + '-k' => "key bind<>ing<>s", + '-L' => qq[ignore lesso<>pen filter], + '-m' => "med. promp<>t tog<>gle", + '-M' => "long promp<>t tog<>gle", + '-n' => "count line num<>ber<>s", + '-N' => "show line n<>um<>ber<>s", + '-o' => "stdin to log", + '-O' => "log over<>wr<>ite", + '-p' => "initial search", + '-P' => "status line\nPrompt", + '-q' => "no info bell\nQuiet", + '-Q' => "no warn bell\nQuiet!", + '-r' => "raw chars", + '-R' => "ansi chars", + '-s' => "squeeze blank lines", + '-S' => "no line wrap", + '-t' => "find tag", + '-T' => "tags file", + '-u' => 'parse \b \r', + '-U' => 'escape \t \b \r', + '-w' => "hilight page d<>own", + '-W' => "hilight forw<>ard", + '-x' => "tab stops", + '-X' => "no termcap init", + '-y' => "scroll limit fw<>d", + '-z' => "page size", + '-"' => "shell quotes", + '-~' => "outside tildes toggle", + '-#' => "col shift", + '--' => "option name", + '-+' => "reset option", }, mode => { @@ -111,15 +118,163 @@ mode => { }, flag => { - ci => [info => 'Temporary message display (or related option).'], - pm => [move => 'Regular file position panning (or option).'], - po => [jump => 'Other file position manipulation (").'], - co => [search => 'Go to matching content (").'], - mo => [file => 'Alter open file buffer (").'], - mv => [misc => 'Other commands and options.'], - - arg => ["key$sign{arg}" => "Commands with a dot need a char argument afterwards."], + g1 => [info => 'Temporary message display (or related option).'], + g2 => [move => 'Regular file position panning (or option).'], + g3 => [jump => 'Other file position manipulation (").'], + g4 => [search => 'Go to matching content (").'], + g7 => [file => 'Alter open file buffer (").'], + g8 => [misc => 'Other commands and options.'], + + arg => ["key" => "Commands with a dot need a char argument afterwards."], more => [more => "A small subset is compatible with `more`."], }, +def => { + '' => { + "\e"=> 'g7 mode^[', + + 'b' => 'g2 more', + '^b'=> '=b', + 'd' => 'g2 more', + '^d'=> '=d', + 'e' => '=j', + '^e'=> '=j', + 'f' => 'g2 more', + '^f'=> '=f', + 'F' => 'g7', + 'g' => 'g2', + '^g'=> '==', + 'G' => 'g2', + 'h' => 'g7 more', + 'H' => '=h', + 'j' => 'g2', + 'k' => 'g2', + '^k'=> '=k', + '^l'=> '=r', # more + 'm' => 'g3 arg', + '^m'=> '=j', + 'n' => 'g4 more', + 'N' => 'g4', + '^n'=> '=j', + 'p' => 'g2', + '^p'=> '=k', + 'q' => 'g8 more', + 'Q' => '=q', + 'r' => 'g1', + '^r'=> '=r', + 'R' => 'g1', + 's' => 'g8 arg', + 't' => 'g4', + 'T' => 'g4', + 'u' => 'g2', + '^u'=> '=u', + 'v' => 'g8 linkvi more', + '^v'=> '=f', + 'V' => 'g1', + 'w' => 'g2', + '^x'=> 'g8 arg mode^x', + 'y' => '=k', + '^y'=> '=k', + 'z' => 'g2 more', + + '!' => 'g8 more', + '|' => 'g8 arg', + ':' => 'g8 arg mode:', + '/' => 'g4 arg more', + '?' => 'g4 arg', + '%' => '=p', + '&' => 'g4 arg', + "'" => 'g3 arg', + '-' => 'g8 arg mode-', + '_' => 'g1 arg mode-', + '=' => 'g1 more', + '+' => 'g7', + + '(' => 'g4', + '<' => '=g', + '>' => '=G', + }, + + '^[' => { # esc + "\e"=> 'g7 mode', + 'n' => 'g4', + 'N' => 'g4', + 'u' => 'g1', + 'v' => '=b', + '(' => 'g2', + ')' => 'g2', + '<' => '=g', + '>' => '=G', + }, + + #'^x' => { + # "\e"=> 'g7 mode', + # '^x' => "='", + # '^v' => '=:e', + #}, + + ':' => { + "\e"=> 'g7 mode', + 'd' => 'g7', + 'e' => 'g7', + 'f' => '==', + 'n' => 'g7 more', + 'p' => 'g7 more', + 'q' => '=q', + 'Q' => '=:q', + 'x' => 'g7', + }, + + '-' => { + "\e"=> 'g7 mode', + 'a' => 'g4', + 'b' => 'g7 arg', + 'B' => 'g7', + 'c' => 'g2', + 'd' => 'g8', + 'D' => 'g8 arg ext', + 'e' => 'g7', + 'E' => 'g7', + 'f' => 'g7', + 'F' => 'g7', + 'g' => 'g4', + 'h' => 'g2 arg', + 'i' => 'g4', + 'I' => 'g4', + 'j' => 'g3 arg', + 'J' => 'g1', + 'k' => 'g8 arg', + 'L' => 'g8', + 'm' => 'g1', + 'M' => 'g1', + 'n' => 'g8', + 'N' => 'g1', + 'o' => 'g8 arg', + 'O' => 'g8 arg', + 'p' => 'g4 arg', + 'P' => 'g1 arg', + 'q' => 'g8', + 'Q' => 'g8', + 'r' => 'g8', + 'R' => 'g8', + 's' => 'g8', + 'S' => 'g8', + 't' => 'g4 arg', + 'T' => 'g4 arg', + 'u' => 'g8', + 'U' => 'g8', + 'V' => '=V', + 'w' => 'g8', + 'W' => 'g8', + 'x' => 'g8 arg', + 'X' => 'g8', + 'y' => 'g2 arg', + 'z' => 'g2 arg', + '"' => 'g8 arg', + '~' => 'g8', + '#' => 'g2 arg', + '-' => 'g8 arg', + '+' => 'g8 arg', + }, +}, }