mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-06-18 19:04:26 +00:00
nvim: xclip no more
This commit is contained in:
parent
b7b1f2d4df
commit
51a478ea32
1 changed files with 2 additions and 3 deletions
|
|
@ -191,9 +191,8 @@ vim.keymap.set('n', '<leader>l', '<C-i>', { desc = 'Forward' })
|
||||||
-- Copy'n'Paste
|
-- Copy'n'Paste
|
||||||
vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Cop[y] selection to system clipboard' })
|
vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Cop[y] selection to system clipboard' })
|
||||||
vim.keymap.set('n', '<leader>y', function()
|
vim.keymap.set('n', '<leader>y', function()
|
||||||
local text = vim.fn.getreg '"'
|
vim.fn.setreg('+', vim.fn.getreg('"'))
|
||||||
vim.fn.system('xclip -i -selection clipboard', text)
|
print('Copied to system clipboard')
|
||||||
print 'Copied to system clipboard'
|
|
||||||
end, {
|
end, {
|
||||||
silent = true,
|
silent = true,
|
||||||
desc = 'Copy last [y]anked or deleted text to system clipboard',
|
desc = 'Copy last [y]anked or deleted text to system clipboard',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue