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:
parent
8649818fb2
commit
4c9bdf0d83
6 changed files with 427 additions and 35 deletions
|
|
@ -418,6 +418,20 @@ M.copy_entry_filename = {
|
|||
end,
|
||||
}
|
||||
|
||||
M.copy_to_system_clipboard = {
|
||||
desc = "Copy the entry under the cursor to the system clipboard",
|
||||
callback = function()
|
||||
require("oil.clipboard").copy_to_system_clipboard()
|
||||
end,
|
||||
}
|
||||
|
||||
M.paste_from_system_clipboard = {
|
||||
desc = "Paste the system clipboard into the current oil directory",
|
||||
callback = function()
|
||||
require("oil.clipboard").paste_from_system_clipboard()
|
||||
end,
|
||||
}
|
||||
|
||||
M.open_cmdline_dir = {
|
||||
desc = "Open vim cmdline with current directory as an argument",
|
||||
deprecated = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue