]> Sergey Matveev's repositories - nnn.git/commitdiff
Use better keys for selection mode
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 29 Sep 2019 17:29:27 +0000 (22:59 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 29 Sep 2019 17:29:27 +0000 (22:59 +0530)
nnn.1
src/nnn.c
src/nnn.h

diff --git a/nnn.1 b/nnn.1
index 478cb9893478f5fc7e565d6b1fa0076460450d45..3401431f1c5fcdd9c7b259c4b5d3dab07a8e9f09 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -131,16 +131,18 @@ auto selects the directory and enters it in this mode.
 .Sh SELECTION
 Use \fI^K\fR to select the file under the cursor.
 .Pp
-To select multiple files the selection mode should be enabled using \fI^Y\fR.
+To select multiple files press \fI^Y\fR and enter selection mode.
 In this mode it's possible to
 .Pp
-(1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
+(1) cherry-pick individual files one by one by pressing \fI^K\fR on each entry (works across directories and contexts); or,
 .br
 (2) navigate to another file in the same directory to select a range of files.
 .Pp
-Press \fI^Y\fR again to save the selection and exit selection mode.
+Running any operation that uses the selection OR pressing \fI^Y\fR again will save the selection and exit the selection mode.
 .Pp
-Selected files are visually indicated by a \fB+\fR before the entries.
+Press \fI^Y\fR twice to clear selection.
+.Pp
+Selected files are visually indicated by a \fI+\fR before the entries.
 .br
 The files in the list can now be listed, copied, moved, removed, archived or linked.
 .br
@@ -162,7 +164,7 @@ when dealing with the !, e and p commands respectively. A single combination to
 .Bd -literal
     export NNN_PLUG='o:fzy-open;p:mocplay;d:ndiff;m:nmount;t:thumb;i:mediainf'
 
-    NOTE: To run a plugin directly, press 'x' followed by the plugin key.
+    NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
 .Ed
 .Pp
 \fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.
@@ -201,7 +203,7 @@ when dealing with the !, e and p commands respectively. A single combination to
 .Nm
 may not handle keypresses correctly when used with tmux (see issue #104 for more details). Set \fBTERM=xterm-256color\fR to address it.
 .Pp
-Use the keybind \fBK\fR to toggle selection if you are having issues with \fB^Y\fR on *BSD or macOS. To use \fB^Y\fR, run:
+Use the keybind \fI'\fR to toggle selection if you are having issues with \fI^Y\fR on *BSD or macOS. To use \fI^Y\fR, run:
 .Bd -literal
     stty dsusp undef
 .Ed
index bb3c4bce994dddaa91b42c7afe13dab5b90dc71e..d1289f45bb055f4a6cb53bf5c95fcff7009abe53 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2856,8 +2856,8 @@ static bool show_help(const char *path)
                "1FILES\n"
                 "b^O  Open with...      n  Create new/link\n"
                  "cD  File detail   ^R F2  Rename/duplicate\n"
-          "5⎵ ^K / Y  Select entry/all  r  Batch rename\n"
-              "9K ^Y  Toggle selection  y  List selection\n"
+          "5⎵ ^K / a  Select entry/all  r  Batch rename\n"
+              "9' ^Y  Toggle selection  y  List selection\n"
                  "cP  Copy selection    X  Delete selection\n"
                  "cV  Move selection   ^X  Delete entry\n"
                  "cf  Create archive    C  Execute entry\n"
index 209222c396b40316bdbb8872cc85da41d32d2459..fa84f1b8a47b82923da9b3e413a9f471cdceebd5 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -198,10 +198,10 @@ static struct key bindings[] = {
        { CONTROL('K'),   SEL_SEL },
        { ' ',            SEL_SEL },
        /* Toggle select multiple files */
-       { 'K',            SEL_SELMUL },
+       { '\'',           SEL_SELMUL },
        { CONTROL('Y'),   SEL_SELMUL },
        /* Select all files in current dir */
-       { 'Y',            SEL_SELALL },
+       { 'a',            SEL_SELALL },
        /* Show list of copied files */
        { 'y',            SEL_SELLST },
        /* Copy from selection buffer */