diff --git a/docs/en/src/awesome-plugins.md b/docs/en/src/awesome-plugins.md index b718aac..747648f 100644 --- a/docs/en/src/awesome-plugins.md +++ b/docs/en/src/awesome-plugins.md @@ -126,4 +126,3 @@ of the following plugins work for you, it's very easy to [62]: https://github.com/duganchen/one-table-column.xplr [63]: https://github.com/dy-sh/dysh-style.xplr [64]: https://github.com/dy-sh/get-rid-of-index.xplr - diff --git a/docs/en/src/default-key-bindings.md b/docs/en/src/default-key-bindings.md index fe2c77f..fe09f38 100644 --- a/docs/en/src/default-key-bindings.md +++ b/docs/en/src/default-key-bindings.md @@ -16,6 +16,8 @@ of [modes][4] and the key mappings for each mode. | key | remaps | action | | --------- | ------ | ------------------- | +| ( | | prev deep branch | +| ) | | next deep branch | | . | | show hidden | | / | ctrl-f | search | | : | | action | @@ -49,25 +51,7 @@ of [modes][4] and the key mappings for each mode. | ~ | | go home | | [0-9] | | input | -### vroot - -| key | remaps | action | -| ------ | ------ | ---------------- | -| . | | vroot $PWD | -| / | | vroot / | -| ctrl-r | | reset vroot | -| ctrl-u | | unset vroot | -| f1 | | global help menu | -| v | | toggle vroot | -| ~ | | vroot $HOME | - -### recover - -| key | remaps | action | -| --- | ------ | ---------------- | -| f1 | | global help menu | - -### create_file +### duplicate_as | key | remaps | action | | ----- | ------ | ---------------- | @@ -75,21 +59,32 @@ of [modes][4] and the key mappings for each mode. | f1 | | global help menu | | tab | | try complete | -### delete +### filter -| key | remaps | action | -| --- | ------ | ---------------- | -| D | | force delete | -| d | | delete | -| f1 | | global help menu | +| key | remaps | action | +| --------- | ------ | ---------------------------------- | +| R | | relative path does not match regex | +| backspace | | remove last filter | +| ctrl-r | | reset filters | +| ctrl-u | | clear filters | +| f1 | | global help menu | +| r | | relative path does match regex | -### create_directory +### action -| key | remaps | action | -| ----- | ------ | ---------------- | -| enter | | submit | -| f1 | | global help menu | -| tab | | try complete | +| key | remaps | action | +| ----- | ------ | -------------------- | +| ! | | shell | +| c | | create | +| e | | open in editor | +| f1 | | global help menu | +| l | | logs | +| m | | toggle mouse | +| p | | edit permissions | +| q | | quit options | +| s | | selection operations | +| v | | vroot | +| [0-9] | | go to index | ### create @@ -99,35 +94,62 @@ of [modes][4] and the key mappings for each mode. | f | | create file | | f1 | | global help menu | -### go_to +### switch_layout + +| key | remaps | action | +| --- | ------ | -------------------- | +| 1 | | default | +| 2 | | no help menu | +| 3 | | no selection panel | +| 4 | | no help or selection | +| f1 | | global help menu | + +### selection_ops | key | remaps | action | | --- | ------ | ---------------- | -| f | | follow symlink | +| c | | copy here | +| e | | edit selection | | f1 | | global help menu | -| g | | top | -| i | | initial $PWD | -| p | | path | -| x | | open in gui | +| h | | hardlink here | +| l | | list selection | +| m | | move here | +| s | | softlink here | +| u | | clear selection | -### relative_path_does_not_match_regex +### delete + +| key | remaps | action | +| --- | ------ | ---------------- | +| D | | force delete | +| d | | delete | +| f1 | | global help menu | + +### number + +| key | remaps | action | +| ----- | ------ | ---------------- | +| down | j | to down | +| enter | | to index | +| f1 | | global help menu | +| k | up | to up | +| [0-9] | | input | + +### create_directory | key | remaps | action | | ----- | ------ | ---------------- | | enter | | submit | | f1 | | global help menu | +| tab | | try complete | -### switch_layout +### recover -| key | remaps | action | -| --- | ------ | -------------------- | -| 1 | | default | -| 2 | | no help menu | -| 3 | | no selection panel | -| 4 | | no help or selection | -| f1 | | global help menu | +| key | remaps | action | +| --- | ------ | ---------------- | +| f1 | | global help menu | -### go_to_path +### rename | key | remaps | action | | ----- | ------ | ---------------- | @@ -135,16 +157,17 @@ of [modes][4] and the key mappings for each mode. | f1 | | global help menu | | tab | | try complete | -### quit +### vroot -| key | remaps | action | -| ----- | ------ | ----------------------- | -| enter | | just quit | -| f | | quit printing focus | -| f1 | | global help menu | -| p | | quit printing pwd | -| r | | quit printing result | -| s | | quit printing selection | +| key | remaps | action | +| ------ | ------ | ---------------- | +| . | | vroot $PWD | +| / | | vroot / | +| ctrl-r | | reset vroot | +| ctrl-u | | unset vroot | +| f1 | | global help menu | +| v | | toggle vroot | +| ~ | | vroot $HOME | ### relative_path_does_match_regex @@ -153,13 +176,12 @@ of [modes][4] and the key mappings for each mode. | enter | | submit | | f1 | | global help menu | -### rename +### relative_path_does_not_match_regex | key | remaps | action | | ----- | ------ | ---------------- | | enter | | submit | | f1 | | global help menu | -| tab | | try complete | ### debug_error @@ -169,34 +191,68 @@ of [modes][4] and the key mappings for each mode. | f1 | | global help menu | | q | | quit | -### action +### edit_permissions -| key | remaps | action | -| ----- | ------ | -------------------- | -| ! | | shell | -| c | | create | -| e | | open in editor | -| f1 | | global help menu | -| l | | logs | -| m | | toggle mouse | -| p | | edit permissions | -| q | | quit options | -| s | | selection operations | -| v | | vroot | -| [0-9] | | go to index | +| key | remaps | action | +| ------ | ------ | ---------------- | +| G | | -group | +| M | | min | +| O | | -other | +| U | | -user | +| ctrl-r | | reset | +| enter | | submit | +| f1 | | global help menu | +| g | | +group | +| m | | max | +| o | | +other | +| u | | +user | -### selection_ops +### 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-r | | reset sorters | +| ctrl-u | | clear sorters | +| e | | by canonical extension | +| enter | | submit | +| f1 | | global help menu | +| l | | by last modified | +| m | | by canonical mime essence | +| n | | by node type | +| r | | by relative path | +| s | | by size | + +### go_to | key | remaps | action | | --- | ------ | ---------------- | -| c | | copy here | -| e | | edit selection | +| f | | follow symlink | | f1 | | global help menu | -| h | | hardlink here | -| l | | list selection | -| m | | move here | -| s | | softlink here | -| u | | clear selection | +| g | | top | +| i | | initial $PWD | +| p | | path | +| x | | open in gui | + +### quit + +| key | remaps | action | +| ----- | ------ | ----------------------- | +| enter | | just quit | +| f | | quit printing focus | +| f1 | | global help menu | +| p | | quit printing pwd | +| r | | quit printing result | +| s | | quit printing selection | ### search @@ -216,7 +272,7 @@ of [modes][4] and the key mappings for each mode. | right | | enter | | tab | | toggle selection | -### duplicate_as +### go_to_path | key | remaps | action | | ----- | ------ | ---------------- | @@ -224,64 +280,10 @@ of [modes][4] and the key mappings for each mode. | f1 | | global help menu | | tab | | try complete | -### number +### create_file | key | remaps | action | | ----- | ------ | ---------------- | -| down | j | to down | -| enter | | to index | +| enter | | submit | | f1 | | global help menu | -| k | up | to up | -| [0-9] | | input | - -### 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-r | | reset sorters | -| ctrl-u | | clear sorters | -| e | | by canonical extension | -| enter | | submit | -| f1 | | global help menu | -| l | | by last modified | -| m | | by canonical mime essence | -| n | | by node type | -| r | | by relative path | -| s | | by size | - -### edit_permissions - -| key | remaps | action | -| ------ | ------ | ---------------- | -| G | | -group | -| M | | min | -| O | | -other | -| U | | -user | -| ctrl-r | | reset | -| enter | | submit | -| f1 | | global help menu | -| g | | +group | -| m | | max | -| o | | +other | -| u | | +user | - -### filter - -| key | remaps | action | -| --------- | ------ | ---------------------------------- | -| R | | relative path does not match regex | -| backspace | | remove last filter | -| ctrl-r | | reset filters | -| ctrl-u | | clear filters | -| f1 | | global help menu | -| r | | relative path does match regex | +| tab | | try complete | diff --git a/docs/en/src/messages.md b/docs/en/src/messages.md index d4a9305..be35b2d 100644 --- a/docs/en/src/messages.md +++ b/docs/en/src/messages.md @@ -320,14 +320,14 @@ Example: - Lua: `"NextVisitedPath"` - YAML: `NextVisitedPath` -#### LastVisitedDeepBranch +#### PreviousVisitedDeepBranch Go to the previous deep level branch. Example: -- Lua: `"LastVisitedDeepBranch"` -- YAML: `LastVisitedDeepBranch` +- Lua: `"PreviousVisitedDeepBranch"` +- YAML: `PreviousVisitedDeepBranch` #### NextVisitedDeepBranch diff --git a/src/app.rs b/src/app.rs index e8c7856..90d229d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -203,7 +203,7 @@ impl History { } } - fn visit_last_deep_branch(self, pwd: &str) -> Self { + fn visit_previous_deep_branch(self, pwd: &str) -> Self { let uniq_deep_dirs = self._uniq_deep_dirs(); if let Some(path) = uniq_deep_dirs .iter() @@ -552,7 +552,7 @@ impl App { Back => self.back(), LastVisitedPath => self.last_visited_path(), NextVisitedPath => self.next_visited_path(), - LastVisitedDeepBranch => self.last_visited_deep_branch(), + PreviousVisitedDeepBranch => self.previous_visited_deep_branch(), NextVisitedDeepBranch => self.next_visited_deep_branch(), FollowSymlink => self.follow_symlink(), SetVroot(p) => self.set_vroot(&p), @@ -1131,8 +1131,8 @@ impl App { } } - fn last_visited_deep_branch(mut self) -> Result { - self.history = self.history.visit_last_deep_branch(&self.pwd); + fn previous_visited_deep_branch(mut self) -> Result { + self.history = self.history.visit_previous_deep_branch(&self.pwd); if let Some(path) = self.history.peek().cloned() { self.change_directory(path.trim_end_matches('/'), false) } else { diff --git a/src/init.lua b/src/init.lua index c3c9846..89d29aa 100644 --- a/src/init.lua +++ b/src/init.lua @@ -1130,9 +1130,9 @@ xplr.config.modes.builtin.default = { }, }, ["("] = { - help = "last deep branch", + help = "prev deep branch", messages = { - "LastVisitedDeepBranch", + "PreviousVisitedDeepBranch", }, }, ["ctrl-r"] = { diff --git a/src/msg/in_/external.rs b/src/msg/in_/external.rs index 1a136f6..9483397 100644 --- a/src/msg/in_/external.rs +++ b/src/msg/in_/external.rs @@ -281,9 +281,9 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: `"LastVisitedDeepBranch"` - /// - YAML: `LastVisitedDeepBranch` - LastVisitedDeepBranch, + /// - Lua: `"PreviousVisitedDeepBranch"` + /// - YAML: `PreviousVisitedDeepBranch` + PreviousVisitedDeepBranch, /// Go to the next deep level branch. ///