]> Sergey Matveev's repositories - nnn.git/commitdiff
Introduce key prompt
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 8 Nov 2018 22:57:42 +0000 (04:27 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 8 Nov 2018 23:00:12 +0000 (04:30 +0530)
README.md
nnn.1
nnn.c

index 33d0851822141336d3a32ea6108ddb6beff205d9..d78fe0e573df4c1275197fd9ea07cbd9f61c3c4e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -49,6 +49,7 @@ Have fun with it! Missing a feature? Want to contribute? Head to the rolling [To
 - [Usage](#usage)
   - [Cmdline options](#cmdline-options)
   - [Keyboard shortcuts](#keyboard-shortcuts)
+  - [Key prompt](#key-prompt)
   - [Contexts](#contexts)
   - [Filters](#filters)
   - [Navigate-as-you-type mode](#navigate-as-you-type-mode)
@@ -223,7 +224,7 @@ optional args:
               -  Last visited dir
               /  Filter entries
               .  Toggle show hidden
-             ^B  Bookmark prompt
+             ^B  Key prompt
               b  Pin current dir
              ^V  Go to pinned dir
               d  Toggle detail view
@@ -259,6 +260,22 @@ optional args:
 
 Help & settings, file details, media info and archive listing are shown in the PAGER. Please use the PAGER-specific keys in these screens.
 
+#### Key prompt
+
+The key prompt, invoked by <kbd>^B</kbd>, provides a powerful multi-functional navigation mechanism. It understands contexts, bookmarks and handy location shortcuts.
+
+| Key | Function |
+|:---:| --- |
+| <kbd>1-4</kbd> | Go to selected context |
+| <kbd>></kbd>, <kbd>.</kbd> | Go to next active context |
+| <kbd><</kbd>, <kbd>,</kbd> | Go to previous active context |
+| key | Go to bookmarked location |
+| <kbd>~</kbd> | Go to HOME directory |
+| <kbd>-</kbd> | Go to last visited directory |
+| <kbd>&</kbd> | Go to start directory |
+
+If all the configured bookmark keys are single character, the prompt is not shown and <kbd>Enter</kbd> is not required; just press <kbd>^B</kbd> followed by the key.
+
 #### Contexts
 
 Contexts (aka _tabs_ aka _workspaces_) serve the purpose of exploring multiple directories simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner:
@@ -267,8 +284,6 @@ Contexts (aka _tabs_ aka _workspaces_) serve the purpose of exploring multiple d
 - other used contexts are underlined
 - rest are unused
 
-The bookmark prompt understands contexts. To switch contexts press <kbd>^B</kbd> and enter the context number (1-4). <kbd>>/.</kbd> and <kbd></.</kbd> at the bookmark prompt cycles between active contexts.
-
 The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory.
 
 When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
@@ -356,10 +371,6 @@ Set environment variable `NNN_BMS` as a string of `key:location` pairs (max 10)
 
     export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
 
-The bookmark prompt also understands the <kbd>~</kbd> (HOME), <kbd>-</kbd> (last visited directory) and <kbd>&</kbd> (start directory) shortcuts.
-
-If all the configured bookmark keys are single character, the prompt is disabled and <kbd>Enter</kbd> is not required; just press <kbd>^B</kbd> followed by the key.
-
 #### copy file paths
 
 ##### selection shortcuts
diff --git a/nnn.1 b/nnn.1
index 40d21d371730a949ee4d44bf379fcd28aff8f43a..f3b2636e89ec8fc2f6efc1b3b20fc8952595070d 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -18,7 +18,7 @@
 .Op Ar PATH
 .Sh DESCRIPTION
 .Nm
-(Noice is Not Noice) is a performance-optimized, feature-packed fork of noice (http://git.2f30.org/noice/) with seamless desktop integration, simplified navigation, \fInavigate-as-you-type\fR mode, bookmarks, disk usage analyzer mode, comprehensive file details and much more. It remains a simple and efficient file manager that stays out of your way.
+(Noice is Not Noice) is a performance-optimized, feature-packed fork of noice (http://git.2f30.org/noice/) with seamless desktop integration, simplified navigation, \fInavigate-as-you-type\fR mode, disk usage analyzer mode, bookmarks, contexts, application launcher, familiar navigation shortcuts, subshell spawning and much more. It remains a simple and efficient file manager that stays out of your way.
 .Pp
 .Nm
 opens the current working directory by default if
@@ -60,7 +60,7 @@ Change filter (more information below)
 .It Ic \&.
 Toggle show hidden . (dot) files
 .It Ic ^B
-Show bookmark key prompt (understands ~, -, &)
+Show key prompt (recognizes bookmark keys, ~, -, & and context IDs)
 .It Ic b
 Pin current directory
 .It Ic ^V
@@ -192,7 +192,7 @@ simultaneously. 4 contexts are available. The status of the contexts are shown i
 .br
 - rest are unused
 .Pp
-The bookmark prompt understands contexts. To switch contexts press \fI^B\fR and enter the context number (1-4).
+The key prompt understands contexts. To switch contexts press \fI^B\fR and enter the context number (1-4).
 .Pp
 The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory.
 .Pp
@@ -247,7 +247,6 @@ when dealing with the !, e and p commands respectively.
 .Bd -literal
     export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
 .Ed
-The bookmark prompt also understands the \fI~\fR (HOME), \fI-\fR (last visited directory) and \fI&\fR shortcuts.
 .Pp
 \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
 files.
diff --git a/nnn.c b/nnn.c
index f7ff0772851a8ca8cf2a4b7449330dc90a30dabb..688215d99c687351a89a7c315cc43574c1287331 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1971,7 +1971,7 @@ static int show_help(char *path)
             "e-  Last visited dir\n"
             "e/  Filter entries\n"
             "e.  Toggle show hidden\n"
-           "d^B  Bookmark prompt\n"
+           "d^B  Key prompt\n"
             "eb  Pin current dir\n"
            "d^V  Go to pinned dir\n"
             "ed  Toggle detail view\n"