Change nav-as-you-type to type-to-nav

This commit is contained in:
Arun Prakash Jana 2020-04-12 19:01:02 +05:30
parent 806b91b60d
commit f54d51c863
No known key found for this signature in database
GPG Key ID: A75979F35C080412
5 changed files with 22 additions and 22 deletions

View File

@ -12,7 +12,7 @@
</p>
<p align="center"><a href="https://www.youtube.com/watch?v=U2n5aGqou9E"><img src="https://i.imgur.com/MPWpmos.png" /></a></p>
<p align="center"><i>navigate-as-you-type & du (click to see demo video)</i></p>
<p align="center"><i>type-to-nav & du (click to see demo video)</i></p>
## Introduction
@ -25,10 +25,10 @@ It runs smoothly on the Pi, [Termux](https://www.youtube.com/watch?v=AbaauM7gUJw
## Black magic! :dark_sunglasses:
1. Load, sort, filter thousands of files instantly
2. Turbo navigate with automatic dir selection
2. Type to navigate with automatic dir selection
3. Select files from anywhere (not just a single dir)
4. Edit and preview markdown, man page, html
5. Open a file and auto-proceed to the next
5. Open a file and auto-advance to the next
6. Export (filtered) list of visible files
7. Find files by mime-type and list in `nnn`
8. Unlimited bookmarks, plugins, commands with custom hotkeys
@ -79,13 +79,13 @@ Once installed (instructions below), _**read the fine [manual](https://github.co
- Disk usage analyzer (block/apparent)
- File picker, (neo)vim plugin
- Navigation
- *Navigate-as-you-type* with dir auto-select
- *Type-to-nav* mode with dir auto-select
- Contexts (_aka_ tabs/workspaces) with custom colors
- Sessions, bookmarks with hotkeys; pin and visit a dir
- Remote mounts (needs sshfs, rclone)
- Familiar shortcuts (arrows, <kbd>~</kbd>, <kbd>-</kbd>, <kbd>@</kbd>), quick reference
- CD on quit (*easy* shell integration)
- Auto-proceed on opening files
- Auto-advance on opening files
- Search
- Instant filtering with *search-as-you-type*
- Regex (POSIX/PCRE) and string (default) filters

View File

@ -22,7 +22,7 @@ complete -c nnn -s F -d 'show fortune'
complete -c nnn -s g -d 'regex filters'
complete -c nnn -s H -d 'show hidden files'
complete -c nnn -s K -d 'detect key collision'
complete -c nnn -s n -d 'start in navigate-as-you-type mode'
complete -c nnn -s n -d 'start in type-to-nav mode'
complete -c nnn -s o -d 'open files only on Enter'
complete -c nnn -s p -r -d 'copy selection to file' -a '-\tstdout'
complete -c nnn -s Q -d 'disable quit confirmation'

View File

@ -20,7 +20,7 @@ args=(
'(-g)-g[regex filters]'
'(-H)-H[show hidden files]'
'(-K)-K[detect key collision]'
'(-n)-n[start in navigate-as-you-type mode]'
'(-n)-n[start in type-to-nav mode]'
'(-o)-o[open files only on Enter]'
'(-p)-p[copy selection to file]:file name'
'(-Q)-Q[disable quit confirmation]'

12
nnn.1
View File

@ -34,7 +34,7 @@
.Nm
(Nnn's 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 with
integration, simplified navigation, \fItype-to-nav\fR mode with
auto select, 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.
@ -54,7 +54,7 @@ to see the list of keybinds.
supports the following options:
.Pp
.Fl A
disable directory auto-select in navigate-as-you-type mode
disable directory auto-select in type-to-nav mode
.Pp
.Fl "b key"
specify bookmark key to open
@ -87,7 +87,7 @@ supports the following options:
test for keybind collision
.Pp
.Fl n
start in navigate-as-you-type mode
start in type-to-nav mode
.Pp
.Fl o
open files only on Enter key
@ -197,13 +197,13 @@ Special keys at \fBempty filter prompt\fR:
.Ed
.Pp
Additional special keys at \fBempty filter prompt\fR
in \fBnav-as-you-type\fR mode:
in \fBtype-to-nav\fR mode:
.Bd -literal
------ + ------------------------
Key | Function
------ + ------------------------
' | Go to first non-dir file
+ | Toggle proceed on open
+ | Toggle auto-advance
, | Pin CWD
- | Go to last visited dir
. | Show hidden files
@ -228,7 +228,7 @@ Common regex use cases:
.br
(4) Exclude filenames having 'nnn' (compiled with PCRE lib): '^(?!nnn)'
.Pp
In the \fInavigate-as-you-type\fR mode directories are opened in filter
In the \fItype-to-nav\fR mode directories are opened in filter
mode, allowing continuous navigation.
.br
When there's a unique match and it's a directory,

View File

@ -262,7 +262,7 @@ typedef struct {
uint picker : 1; /* Write selection to user-specified file */
uint pickraw : 1; /* Write selection to sdtout before exit */
uint nonavopen : 1; /* Open file on right arrow or `l` */
uint autoselect : 1; /* Auto-select dir in nav-as-you-type mode */
uint autoselect : 1; /* Auto-select dir in type-to-nav mode */
uint metaviewer : 1; /* Index of metadata viewer in utils[] */
uint useeditor : 1; /* Use VISUAL to open text files */
uint runplugin : 1; /* Choose plugin mode */
@ -2562,7 +2562,7 @@ static int filterentries(char *path, char *lastname)
if (cfg.filtermode) {
switch (*ch) {
case '\'': // fallthrough /* Go to first non-dir file */
case '+': // fallthrough /* Toggle proceed on open */
case '+': // fallthrough /* Toggle auto-advance */
case ',': // fallthrough /* Pin CWD */
case '-': // fallthrough /* Visit last visited dir */
case '.': // fallthrough /* Show hidden files */
@ -3712,7 +3712,7 @@ static char *visit_parent(char *path, char *newpath, int *presel)
/* There is no going back */
if (istopdir(path)) {
/* Continue in navigate-as-you-type mode, if enabled */
/* Continue in type-to-nav mode, if enabled */
if (cfg.filtermode && presel)
*presel = FILTER;
return NULL;
@ -4085,14 +4085,14 @@ static void show_help(const char *path)
"9G ^E End%-21c0 Lock terminal\n"
"9b ^/ Bookmark key%-12c, Pin CWD\n"
"a1-4 Context 1-4%-7c(Sh)Tab Cycle context\n"
"c/ Filter%-17c^N Nav-as-you-type toggle\n"
"c/ Filter%-17c^N Toggle type-to-nav\n"
"aEsc Exit prompt%-12c^L Redraw/clear prompt\n"
"c? Help, conf%-14c+ Toggle proceed on open\n"
"c? Help, conf%-14c+ Toggle auto-advance\n"
"cq Quit context%-11c^G QuitCD\n"
"b^Q Quit%-20cQ Quit with err\n"
"1FILES\n"
"9o ^O Open with...%-12cn Create new/link\n"
"9f ^F File details%-12cd Detail view toggle\n"
"9f ^F File details%-12cd Detail mode toggle\n"
"b^R Rename/dup%-14cr Batch rename\n"
"cz Archive%-17ce Edit in EDITOR\n"
"5Space ^J (Un)select%-11cm ^K Mark range/clear\n"
@ -5718,7 +5718,7 @@ nochange:
/* In case of successful operation, reload contents */
/* Continue in navigate-as-you-type mode, if enabled */
/* Continue in type-to-nav mode, if enabled */
if ((cfg.filtermode || filterset()) && !refresh)
break;
@ -6202,7 +6202,7 @@ nochange:
r = FALSE;
}
/* Continue in navigate-as-you-type mode, if enabled */
/* Continue in type-to-nav mode, if enabled */
if (cfg.filtermode)
presel = FILTER;
@ -6567,7 +6567,7 @@ static void usage(void)
" -g regex filters [default: string]\n"
" -H show hidden files\n"
" -K detect key collision\n"
" -n nav-as-you-type mode\n"
" -n type-to-nav mode\n"
" -o open files only on Enter\n"
" -p file selection file [stdout if '-']\n"
" -Q no quit confirmation\n"