Switch the preview pane between hidden and shown.
screenshot-000538.mp4
ya pack -a yazi-rs/plugins:hide-preview
Add this to your ~/.config/yazi/keymap.toml
:
[[manager.prepend_keymap]]
on = "T"
run = "plugin hide-preview"
desc = "Hide or show preview"
Make sure the T key is not used elsewhere.
In addition to triggering the plugin with a keypress, you can also trigger it in your init.lua
file:
if os.getenv("NVIM") then
require("hide-preview"):entry()
end
In the example above, when it detects that you're using Yazi in nvim, the
preview is hidden by default - you can always press T
(or any key you've bound) to display it again.
This plugin is MIT-licensed. For more information check the LICENSE file.