Krolyxon
Commit a8246b3

Branches

Refs →

aurora.configyazipluginssmart-enter.yaziREADME.md

40 lines · 1008 B · Markdown

1# smart-enter.yazi
2
3[`Open`][open] files or [`enter`][enter] directories all in one key!
4
5## Installation
6
7```sh
8ya pkg add yazi-rs/plugins:smart-enter
9```
10
11## Usage
12
13Bind your <kbd>l</kbd> key to the plugin, in your `~/.config/yazi/keymap.toml`:
14
15```toml
16[[mgr.prepend_keymap]]
17on = "l"
18run = "plugin smart-enter"
19desc = "Enter the child directory, or open the file"
20```
21
22## Advanced
23
24By default, `--hovered` is passed to the [`open`][open] command, make the behavior consistent with [`enter`][enter] avoiding accidental triggers,
25which means both will only target the currently hovered file.
26
27If you still want `open` to target multiple selected files, add this to your `~/.config/yazi/init.lua`:
28
29```lua
30require("smart-enter"):setup {
31 open_multi = true,
32}
33```
34
35## License
36
37This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
38
39[open]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.open
40[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.enter