From 2179be473f4d7fa985c905eee775dda400bef113 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sat, 21 May 2022 02:42:24 +0530 Subject: [PATCH] Fix docs --- docs/en/src/default-key-bindings.md | 178 ++++++++++++++-------------- src/app.rs | 14 +-- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/docs/en/src/default-key-bindings.md b/docs/en/src/default-key-bindings.md index cad5c74..d018c81 100644 --- a/docs/en/src/default-key-bindings.md +++ b/docs/en/src/default-key-bindings.md @@ -55,51 +55,6 @@ of [modes][4] and the key mappings for each mode. | ctrl-c | | terminate | | esc | | escape | -### filter - -| key | remaps | action | -| --------- | ------ | ---------------------------------- | -| R | | relative path does not match regex | -| backspace | | remove last filter | -| ctrl-c | | terminate | -| ctrl-r | | reset filters | -| ctrl-u | | clear filters | -| enter | esc | done | -| r | | relative path does match regex | - -### number - -| key | remaps | action | -| ------ | ------ | --------- | -| ctrl-c | | terminate | -| down | j | to down | -| enter | | to index | -| esc | | cancel | -| k | up | to up | -| [0-9] | | input | - -### go to - -| key | remaps | action | -| ------ | ------ | -------------- | -| ctrl-c | | terminate | -| esc | | cancel | -| f | | follow symlink | -| g | | top | -| x | | open in gui | - -### search - -| key | remaps | action | -| ------ | ------ | ---------------- | -| ctrl-c | | terminate | -| ctrl-n | down | down | -| ctrl-p | up | up | -| enter | esc | focus | -| left | | back | -| right | | enter | -| tab | | toggle selection | - ### selection ops | key | remaps | action | @@ -110,21 +65,6 @@ of [modes][4] and the key mappings for each mode. | m | | move here | | x | | open in gui | -### action to - -| key | remaps | action | -| ------ | ------ | -------------------- | -| ! | | shell | -| c | | create | -| ctrl-c | | terminate | -| e | | open in editor | -| esc | | cancel | -| l | | logs | -| m | | toggle mouse | -| q | | quit options | -| s | | selection operations | -| [0-9] | | go to index | - ### create | key | remaps | action | @@ -134,6 +74,14 @@ of [modes][4] and the key mappings for each mode. | esc | | cancel | | f | | create file | +### create directory + +| key | remaps | action | +| ------ | ------ | ---------------- | +| ctrl-c | | terminate | +| enter | | create directory | +| esc | | cancel | + ### create file | key | remaps | action | @@ -142,13 +90,26 @@ of [modes][4] and the key mappings for each mode. | enter | | create file | | esc | | cancel | -### create directory +### number -| key | remaps | action | -| ------ | ------ | ---------------- | -| ctrl-c | | terminate | -| enter | | create directory | -| esc | | cancel | +| key | remaps | action | +| ------ | ------ | --------- | +| ctrl-c | | terminate | +| down | j | to down | +| enter | | to index | +| esc | | cancel | +| k | up | to up | +| [0-9] | | input | + +### go to + +| key | remaps | action | +| ------ | ------ | -------------- | +| ctrl-c | | terminate | +| esc | | cancel | +| f | | follow symlink | +| g | | top | +| x | | open in gui | ### rename @@ -175,30 +136,32 @@ of [modes][4] and the key mappings for each mode. | d | | delete | | esc | | cancel | -### sort +### action to -| key | remaps | action | -| --------- | ------ | --------------------------------- | -| ! | | reverse sorters | -| C | | by created reverse | -| E | | by canonical extension reverse | -| L | | by last modified reverse | -| M | | by canonical mime essence reverse | -| N | | by node type reverse | -| R | | by relative path reverse | -| S | | by size reverse | -| backspace | | remove last sorter | -| c | | by created | -| ctrl-c | | terminate | -| ctrl-r | | reset sorters | -| ctrl-u | | clear sorters | -| e | | by canonical extension | -| enter | esc | done | -| l | | by last modified | -| m | | by canonical mime essence | -| n | | by node type | -| r | | by relative path | -| s | | by size | +| key | remaps | action | +| ------ | ------ | -------------------- | +| ! | | shell | +| c | | create | +| ctrl-c | | terminate | +| e | | open in editor | +| esc | | cancel | +| l | | logs | +| m | | toggle mouse | +| q | | quit options | +| s | | selection operations | +| [0-9] | | go to index | + +### search + +| key | remaps | action | +| ------ | ------ | ---------------- | +| ctrl-c | | terminate | +| ctrl-n | down | down | +| ctrl-p | up | up | +| enter | esc | focus | +| left | | back | +| right | | enter | +| tab | | toggle selection | ### filter @@ -228,6 +191,31 @@ of [modes][4] and the key mappings for each mode. | enter | | apply filter | | esc | | cancel | +### sort + +| key | remaps | action | +| --------- | ------ | --------------------------------- | +| ! | | reverse sorters | +| C | | by created reverse | +| E | | by canonical extension reverse | +| L | | by last modified reverse | +| M | | by canonical mime essence reverse | +| N | | by node type reverse | +| R | | by relative path reverse | +| S | | by size reverse | +| backspace | | remove last sorter | +| c | | by created | +| ctrl-c | | terminate | +| ctrl-r | | reset sorters | +| ctrl-u | | clear sorters | +| e | | by canonical extension | +| enter | esc | done | +| l | | by last modified | +| m | | by canonical mime essence | +| n | | by node type | +| r | | by relative path | +| s | | by size | + ### switch layout | key | remaps | action | @@ -239,6 +227,18 @@ of [modes][4] and the key mappings for each mode. | ctrl-c | | terminate | | esc | | cancel | +### quit + +| key | remaps | action | +| ------ | ------ | ----------------------- | +| ctrl-c | | terminate | +| enter | | just quit | +| esc | | cancel | +| f | | quit printing focus | +| p | | quit printing pwd | +| r | | quit printing result | +| s | | quit printing selection | + [1]: https://www.vim.org/ [2]: https://github.com/jarun/nnn/ [3]: #default diff --git a/src/app.rs b/src/app.rs index 6612254..9299455 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1545,23 +1545,23 @@ impl App { &builtin.default, &builtin.debug_error, &builtin.recover, - &builtin.filter, - &builtin.number, - &builtin.go_to, - &builtin.search, &builtin.selection_ops, - &builtin.action, &builtin.create, - &builtin.create_file, &builtin.create_directory, + &builtin.create_file, + &builtin.number, + &builtin.go_to, &builtin.rename, &builtin.duplicate_as, &builtin.delete, - &builtin.sort, + &builtin.action, + &builtin.search, &builtin.filter, &builtin.relative_path_does_match_regex, &builtin.relative_path_does_not_match_regex, + &builtin.sort, &builtin.switch_layout, + &builtin.quit, ] .iter().map(|m| (&m.name, m.to_owned())) .chain(custom.iter())