diff --git a/README.md b/README.md index b414f9a..519d792 100644 --- a/README.md +++ b/README.md @@ -105,13 +105,7 @@ to the trash location. - `.copyRelativeDirectoryPath` or `:CopyRelativeDirectoryPath`: Copy the relative directory path. -When `clipboard="unnamed[plus]"` has been set, copies to the `+` register, -otherwise to `"`. To always use system clipboard, put this in your configuration -file: - -```lua -vim.g.genghis_use_systemclipboard = true -``` +All commands use the system clipboard. ### Disable Ex-Commands diff --git a/lua/genghis/init.lua b/lua/genghis/init.lua index 20083df..5c7ee9d 100644 --- a/lua/genghis/init.lua +++ b/lua/genghis/init.lua @@ -194,14 +194,9 @@ end ---copying file information ---@param expandOperation string local function copyOp(expandOperation) - local reg = '"' - local clipboardOpt = vim.opt.clipboard:get() - local useSystemClipb = vim.g.genghis_use_systemclipboard - or (#clipboardOpt > 0 and clipboardOpt[1]:find("unnamed")) - if useSystemClipb then reg = "+" end - + local register = "+" local toCopy = fn.expand(expandOperation) - fn.setreg(reg, toCopy) + fn.setreg(register, toCopy) vim.notify(toCopy, vim.log.levels.INFO, { title = "Copied" }) end