From ea82cbb1c0b778dd946c717cceace53fab391ba8 Mon Sep 17 00:00:00 2001 From: Tom Li Dobnik Date: Sat, 9 Aug 2025 17:12:43 +0200 Subject: init --- .config/yazi/plugins/smart-enter.yazi/README.md | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .config/yazi/plugins/smart-enter.yazi/README.md (limited to '.config/yazi/plugins/smart-enter.yazi/README.md') diff --git a/.config/yazi/plugins/smart-enter.yazi/README.md b/.config/yazi/plugins/smart-enter.yazi/README.md new file mode 100644 index 0000000..d4c6bbd --- /dev/null +++ b/.config/yazi/plugins/smart-enter.yazi/README.md @@ -0,0 +1,40 @@ +# smart-enter.yazi + +[`Open`][open] files or [`enter`][enter] directories all in one key! + +## Installation + +```sh +ya pack -a yazi-rs/plugins:smart-enter +``` + +## Usage + +Bind your l key to the plugin, in your `~/.config/yazi/keymap.toml`: + +```toml +[[manager.prepend_keymap]] +on = "l" +run = "plugin smart-enter" +desc = "Enter the child directory, or open the file" +``` + +## Advanced + +By default, `--hovered` is passed to the [`open`][open] command, make the behavior consistent with [`enter`][enter] avoiding accidental triggers, +which means both will only target the currently hovered file. + +If you still want `open` to target multiple selected files, add this to your `~/.config/yazi/init.lua`: + +```lua +require("smart-enter"):setup { + open_multi = true, +} +``` + +## License + +This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. + +[open]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.open +[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.enter -- cgit v1.2.3