readline: describe/complete key modes
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 5 May 2009 16:00:27 +0000 (16:00 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 5 May 2009 16:00:27 +0000 (16:00 +0000)
readline.inc.pl
readline.plp

index 22c3b8abc95b0652e14bd5d4524e865225968edd..288885fdc86b4877261d89b3becda6e3eb8d42dd 100644 (file)
@@ -1,7 +1,7 @@
 use utf8;
 
 '' => {
-       desc => "normal mode",
+       desc => "emacs mode",
 
        '+\\'=> ["delete whitesp$sign{_}ace", 'mo'],
        '+_' => '+.',
@@ -15,7 +15,7 @@ use utf8;
        '^?' => '^h',
        '+?' => ["list complet$sign{_}ion$sign{_}s", 'ci'],
        '+=' => '+?', # emacs
-       '^@' => ["set mark"],
+       '^@' => ["set mark", 'mv'],
        '+&' => ["tilde expand", 'mi'],
        '+~' => '+&', # emacs
        '^_' => ["undo", 'co'],
@@ -30,15 +30,15 @@ use utf8;
        '^e' => ["end of line", 'pm'],
        '^f' => ["char forward", 'pm'],
        '+f' => ["word forward", 'pm'],
-       '^g' => ["abort cmd, bell"],
+       '^g' => ["abort cmd, bell", 'mv'],
        '^h' => ["back$sign{_}space", 'mo'],
-       '^i' => ["complete", '', '(tab)'],
+       '^i' => ["complete", 'mi', '(tab)'],
        '^j' => '^m',
        '^+j'=> ["vim mode", 'me'],
        '^k' => ["delete till eol", 'mo'],
        '^l' => ["clear screen", 'ci'],
        '+l' => ["lowcase word", 'mi'],
-       '^m' => ["enter line", '', '(enter)'],
+       '^m' => ["enter line", 'co', '(enter)'],
        '^n' => ["history next", 'co'],
        '+n' => ["match history", 'co'],
        '^p' => ["history back", 'co'],
@@ -51,12 +51,12 @@ use utf8;
        '+t' => ["move word forw$sign{_}ard", 'mi', 'Transpose word'],
        '^u' => ["delete till bol", 'mo'], # unix
        '+u' => ["upcase word", 'mi'],
-       '^v' => ["verbatim char"],
+       '^v' => ["verbatim char", 'mv'],
        '^w' => ["delete word", 'mo'], # unix
 #      '^xBS' => ["delete till bol", 'mo'],
        '^x' => ["extend$sign{_}ed", 'me arg'],
-       '^y' => ["yank top"],
-       '+y' => ["rotate yank"],
+       '^y' => ["yank top", 'co'],
+       '+y' => ["rotate yank", 'co ring'],
        '^+y'=> ["yank arg"],
 },
 
index b8a6022c6c19b80ec8514163409ab5eebd1e9b9b..019876f1dc1a4ec28c1957b4d9ea977e59c5a9be 100644 (file)
@@ -38,14 +38,13 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 
 <h1>readline cheat sheet</h1>
 
-<h2>normal mode (default)</h2>
+<h2>default emacs mode</h2>
 
 <ul id="rows">
 
 <li class="row">
        <ul class="keys omni">
-       <li class="mo" onclick="setmode()"><b>Esc</b> normal mode
-               <!-- not as static anymore, but never bothered; just see ^[ -->
+       <li class="me" onclick="setmode()"><b>Esc</b> +
        </ul>
 </li>
 
@@ -65,19 +64,17 @@ $keys->print_rows($get{static} || '543');
                <dt class="ci">info
                        <dd>Info command: shows/does something without altering anything.
                <dt class="pm">motion
-                       <dd>Moves the cursor, or defines the range for an operator (<:= $sign{motion} :>).
-               <dt class="po">
-                       <dd>
+                       <dd>Move the cursor.
                <dt class="co">history
-                       <dd>
+                       <dd>Replace contents involving kill ring, undo, or command history.
                <dt class="mi">change
-                       <dd>
+                       <dd>Alter current text (filtering or completion).
                <dt class="mo">delete
-                       <dd>
-               <dt class="mv">
-                       <dd>
+                       <dd>Remove text.
+               <dt class="mv">misc
+                       <dd>Miscellaneous commands.
                <dt class="me">mode
-                       <dd>
+                       <dd>Additional key functionality (click to view).
                </dl>
        </div>
 
@@ -85,12 +82,6 @@ $keys->print_rows($get{static} || '543');
                <dl class="legend legend-options">
                <dt>key<:= $sign{arg} :>
                        <dd>Commands with a dot need a char argument afterwards.
-               <dt>key<:= $sign{motion} :>
-                       <dd>Requires a motion afterwards, operates between cursor and destination.
-               <dt class="vim">vim
-                       <dd>Not in original Vi (assessment incomplete).
-               <dt class="vim7">vim7
-                       <dd>New in vim version 7.x.
                </dl>
 
                <ul class="legend legend-set">