Browse Source

Introduce key prompt

master
Arun Prakash Jana 6 years ago
parent
commit
e8eeff9b3d
No known key found for this signature in database GPG Key ID: A75979F35C080412
3 changed files with 22 additions and 12 deletions
  1. +18
    -7
      README.md
  2. +3
    -4
      nnn.1
  3. +1
    -1
      nnn.c

+ 18
- 7
README.md View File

@@ -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


+ 3
- 4
nnn.1 View File

@@ -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.


+ 1
- 1
nnn.c View File

@@ -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"


Loading…
Cancel
Save