aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-29 22:59:27 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-09-29 22:59:27 +0530
commit17de5bfc272243e5797715da3a2306a71c70fc88 (patch)
tree59c2270e342a090185a62611ae03c711c41c6806
parentb046157b61b880adc9d601d2e3230dc96ec63029 (diff)
downloadnnn-17de5bfc272243e5797715da3a2306a71c70fc88.tar.gz
Use better keys for selection mode
-rw-r--r--nnn.114
-rw-r--r--src/nnn.c4
-rw-r--r--src/nnn.h4
3 files changed, 12 insertions, 10 deletions
diff --git a/nnn.1 b/nnn.1
index 478cb98..3401431 100644
--- 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
diff --git a/src/nnn.c b/src/nnn.c
index bb3c4bc..d1289f4 100644
--- 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"
diff --git a/src/nnn.h b/src/nnn.h
index 209222c..fa84f1b 100644
--- 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 */