1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
YAZI-ENTER
Find an entry in the current Yazi view and activate the Hovered match.
Matching, sorting, cursor movement, directory entry, and file opening use Yazi's
built-in manager actions.
REQUIREMENTS
- Yazi 26.9.1.
- Yazi's bundled Lua runtime.
The runtime contract is verified against Yazi 26.9.1. Review compatibility
before you use a later Yazi release.
INSTALLATION
Copy this directory with its name unchanged into the plugins directory of the
active Yazi configuration:
Unix-like systems:
~/.config/yazi/plugins/yazi-enter.yazi/main.lua
Windows:
%AppData%\yazi\config\plugins\yazi-enter.yazi\main.lua
When YAZI_CONFIG_HOME is set, use its plugins directory. The installed entry
file must be named main.lua. The plugin uses keymap actions as its full setup.
KEYMAP SETUP
Add one or more bindings to keymap.toml in the active Yazi configuration. This
example gives the plugin priority on Yazi's standard forward and backward find
keys and activates either entry type:
[[mgr.prepend_keymap]]
on = "/"
run = "plugin yazi-enter -- either --smart"
desc = "Find next and activate"
[[mgr.prepend_keymap]]
on = "?"
run = "plugin yazi-enter -- either --previous --smart"
desc = "Find previous and activate"
Use one TOML keymap form consistently. If the file already has an
[mgr] prepend_keymap array, add equivalent mapping objects to that array.
Restart Yazi after you change the plugin or keymap files.
Choose any keys and any of these actions:
Forward search:
plugin yazi-enter -- directory --smart
plugin yazi-enter -- file --smart
plugin yazi-enter -- either --smart
Backward search:
plugin yazi-enter -- directory --previous --smart
plugin yazi-enter -- file --previous --smart
plugin yazi-enter -- either --previous --smart
MODES
- directory: Enter the Hovered match when it is a directory.
- file: Open the Hovered match when it is a file entry.
- either: Enter a directory or open a file entry according to its type.
The native finder searches every entry type in each mode. The mode controls
the action after submission. A type mismatch produces a zero-action result.
File opening targets only the Hovered match and uses the current Yazi opener
rules. Persistent selections stay separate from that target.
TRANSIENT SORTING
Each valid invocation saves the active tab's complete sort preference. It then
applies forward alphabetical sorting before it opens the prompt. This is the
same sort request as Yazi's default `,a` binding:
sort alphabetical --reverse=no
The temporary request changes only the sort method and reverse flag. The
current directory-first, case-sensitivity, transliteration, and fallback
settings stay active during the prompt.
The plugin restores all six saved sort fields when the session ends. Restore
runs after directory entry, hovered-file opening, a zero-action result, Cancel,
input closure, a failed final Find, or a caught runtime error. Directory entry
and file opening are queued before restore.
Overlapping yazi-enter prompts share one sort lease. The first prompt saves the
original preference. Alphabetical order stays active until the final prompt
closes. The final release restores the original preference once.
OPTIONS
- --previous searches in current-then-backward order and wraps.
- --smart uses smart case: lowercase patterns are case-insensitive, and a
pattern with an uppercase character is case-sensitive.
- --insensitive uses case-insensitive matching when --smart is disabled.
Matching is case-sensitive when both case options are disabled. Smart case has
priority when both case options are enabled. Bare options enable their value.
The values true, false, yes, and no are also accepted.
USAGE
Open a configured binding, enter a query, and use the configured input submit
key. The default submit key is Enter. The default cancel keys are Esc and
Ctrl-c. The prompt uses the active Yazi input theme, input keymap, and shared
input history.
Queries are unanchored Rust regular expressions. Plain text normally acts as a
substring query. Escape regular-expression characters when they must be
literal. During typing, you can correct a malformed expression in the same
prompt.
A successful query moves the cursor with Yazi's native find behavior. Submit
applies the complete final query before activation. An empty query, a query
with zero matches, a malformed submitted expression, or a mode/type mismatch
produces a zero-action result. Cancel keeps the latest successful finder state.
Yazi's find_arrow bindings, normally n and N, can continue through that finder
state.
Directory activation uses Yazi's enter action. File activation uses Yazi's
hovered-only open action, including chooser mode, MIME handling, opener rules,
and task handling.
|