浏览代码

Lead followed by . to show hidden files

master
Arun Prakash Jana 5 年前
父节点
当前提交
2c90999381
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 2 个文件被更改,包括 14 次插入8 次删除
  1. +3
    -2
      README.md
  2. +11
    -6
      src/nnn.c

+ 3
- 2
README.md 查看文件

@@ -283,11 +283,12 @@ The Leader/Lead key provides a powerful multi-functional navigation mechanism. I
| Key | Function |
|:---:| --- |
| <kbd>1-4</kbd> | Go to/create selected context |
| <kbd>></kbd>, <kbd>.</kbd> | Go to next active context |
| <kbd><</kbd>, <kbd>,</kbd> | Go to previous active context |
| <kbd>]</kbd> | Go to next active context |
| <kbd>[</kbd> | Go to previous active context |
| key | Go to bookmarked location |
| <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> | Toggle show hidden files |
| <kbd>q</kbd> | Quit context |

When the filter is on, <kbd>/</kbd> works as an additional Leader key.


+ 11
- 6
src/nnn.c 查看文件

@@ -3728,7 +3728,7 @@ nochange:
case '@':
presel = fd;
goto nochange;
case '\'':
case '\'': /* jump to first file in the directory */
for (r = 0; r < ndents; ++r) {
if (!(dents[r].flags & DIR_OR_LINK_TO_DIR)) {
move_cursor((r) % ndents, 0);
@@ -3738,12 +3738,17 @@ nochange:
if (r != ndents)
continue;;
goto nochange;
case '>': // fallthrough
case '.': // fallthrough
case '<': // fallthrough
case ',':
case '.':
cfg.showhidden ^= 1;
setdirwatch();
if (ndents)
copycurname();
goto begin;
case ']': // fallthrough
case '[': // fallthrough
/* visit next and previous contexts */
r = cfg.curctx;
if (fd == '>' || fd == '.')
if (fd == ']')
do
r = (r + 1) & ~CTX_MAX;
while (!g_ctx[r].c_cfg.ctxactive);


正在加载...
取消
保存