Skip to content

boydaihungst/save-clipboard-to-file.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

save-clipboard-to-file.yazi

Yazi plugin to paste clipboard content to file.

Preview

  • Relative file name:

    image

  • Overwrite confirm dialog:

    image

  • Relavetive path:

    image

Features

  • Paste clipboard content to file. You can input file name or relative path.
  • Ask to overwrite file if it exists

Requirements

Installation

ya pkg add boydaihungst/save-clipboard-to-file
# or
ya pack -a boydaihungst/save-clipboard-to-file

Usage

Key binding

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" },

  ]

Configuration (Optional)

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,
})

About

Yazi plugin to paste clipboard content to file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages