improv: path-copying commands now always copy to system clipboard
parent
01b1d297b0
commit
dda24ddca2
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue