mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Lead followed by . to show hidden files
This commit is contained in:
parent
871685f7ca
commit
2c90999381
|
@ -283,11 +283,12 @@ The Leader/Lead key provides a powerful multi-functional navigation mechanism. I
|
||||||
| Key | Function |
|
| Key | Function |
|
||||||
|:---:| --- |
|
|:---:| --- |
|
||||||
| <kbd>1-4</kbd> | Go to/create selected context |
|
| <kbd>1-4</kbd> | Go to/create selected context |
|
||||||
| <kbd>></kbd>, <kbd>.</kbd> | Go to next active context |
|
| <kbd>]</kbd> | Go to next active context |
|
||||||
| <kbd><</kbd>, <kbd>,</kbd> | Go to previous active context |
|
| <kbd>[</kbd> | Go to previous active context |
|
||||||
| key | Go to bookmarked location |
|
| key | Go to bookmarked location |
|
||||||
| <kbd>'</kbd> | Go to first file in directory |
|
| <kbd>'</kbd> | Go to first file in directory |
|
||||||
| <kbd>~</kbd> <kbd>`</kbd> <kbd>@</kbd> <kbd>-</kbd> | Go to HOME, `/`, start, last visited dir |
|
| <kbd>~</kbd> <kbd>`</kbd> <kbd>@</kbd> <kbd>-</kbd> | Go to HOME, `/`, start, last visited dir |
|
||||||
|
| <kbd>.</kbd> | Toggle show hidden files |
|
||||||
| <kbd>q</kbd> | Quit context |
|
| <kbd>q</kbd> | Quit context |
|
||||||
|
|
||||||
When the filter is on, <kbd>/</kbd> works as an additional Leader key.
|
When the filter is on, <kbd>/</kbd> works as an additional Leader key.
|
||||||
|
|
17
src/nnn.c
17
src/nnn.c
|
@ -3728,7 +3728,7 @@ nochange:
|
||||||
case '@':
|
case '@':
|
||||||
presel = fd;
|
presel = fd;
|
||||||
goto nochange;
|
goto nochange;
|
||||||
case '\'':
|
case '\'': /* jump to first file in the directory */
|
||||||
for (r = 0; r < ndents; ++r) {
|
for (r = 0; r < ndents; ++r) {
|
||||||
if (!(dents[r].flags & DIR_OR_LINK_TO_DIR)) {
|
if (!(dents[r].flags & DIR_OR_LINK_TO_DIR)) {
|
||||||
move_cursor((r) % ndents, 0);
|
move_cursor((r) % ndents, 0);
|
||||||
|
@ -3738,12 +3738,17 @@ nochange:
|
||||||
if (r != ndents)
|
if (r != ndents)
|
||||||
continue;;
|
continue;;
|
||||||
goto nochange;
|
goto nochange;
|
||||||
case '>': // fallthrough
|
case '.':
|
||||||
case '.': // fallthrough
|
cfg.showhidden ^= 1;
|
||||||
case '<': // fallthrough
|
setdirwatch();
|
||||||
case ',':
|
if (ndents)
|
||||||
|
copycurname();
|
||||||
|
goto begin;
|
||||||
|
case ']': // fallthrough
|
||||||
|
case '[': // fallthrough
|
||||||
|
/* visit next and previous contexts */
|
||||||
r = cfg.curctx;
|
r = cfg.curctx;
|
||||||
if (fd == '>' || fd == '.')
|
if (fd == ']')
|
||||||
do
|
do
|
||||||
r = (r + 1) & ~CTX_MAX;
|
r = (r + 1) & ~CTX_MAX;
|
||||||
while (!g_ctx[r].c_cfg.ctxactive);
|
while (!g_ctx[r].c_cfg.ctxactive);
|
||||||
|
|
Loading…
Reference in a new issue