Yazi plugin to paste clipboard content to file.
- Paste clipboard content to file. You can input file name or relative path.
- Ask to overwrite file if it exists
ya pkg add boydaihungst/save-clipboard-to-file
# or
ya pack -a boydaihungst/save-clipboard-to-file
Add this to your keymap.toml
:
[mgr]
prepend_keymap = [
{ on = [ "p", "c" ], run = "plugin save-clipboard-to-file", desc = "Paste clipboard content to file and hover after created" },
#{ on = [ "p", "c" ], run = "plugin save-clipboard-to-file -- --no-hover", desc = "Paste clipboard content to file without hover after created" },
]
This setup is the default configuration. You don't need to call setup()
if you don't want to change the default configuration.
Any options not specified will use the default value.
Add this to your init.lua
:
require("save-clipboard-to-file"):setup({
-- Position of input file name or path dialog
input_position = { "center", w = 70 },
-- Position of overwrite confirm dialog
overwrite_confirm_position = { "center", w = 70, h = 10 },
-- Hide notify
hide_notify = false,
})