feat: copy/paste to system clipboard (#559)

* feat: copy/paste to system clipboard on macOS

* stylua

* feat: copy/paste to system clipboard on linux

* force mime type

* fix string.gsub

* vim.uv or vim.loop

* fix stylua

* support gnome directly

* support wayland

* refactor: extract clipboard actions into separate file

* fix: copy/paste in KDE

* refactor: simplify file loading

* fix: copy/paste on x11

* fix: better error message when clipboard command not found

* fix: paste on mac

* fix: pasting in Gnome

* feat: support pasting multiple files

* feat: support copying multiple files to clipboard

---------

Co-authored-by: Steve Walker <65963536+etherswangel@users.noreply.github.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
Steve Walker 2025-03-20 23:19:18 +08:00 committed by GitHub
parent 8649818fb2
commit 4c9bdf0d83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 427 additions and 35 deletions

View file

@ -545,6 +545,9 @@ close *actions.clos
Parameters:
{exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer
copy_to_system_clipboard *actions.copy_to_system_clipboard*
Copy the entry under the cursor to the system clipboard
open_cmdline *actions.open_cmdline*
Open vim cmdline with current entry as an argument
@ -565,6 +568,9 @@ open_terminal *actions.open_termina
parent *actions.parent*
Navigate to the parent path
paste_from_system_clipboard *actions.paste_from_system_clipboard*
Paste the system clipboard into the current oil directory
preview *actions.preview*
Open the entry under the cursor in a preview window, or close the preview
window if already open