From bc4cd2a52114d2d6d46d95f80d7e7471f41c67ba Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 30 Apr 2024 08:59:51 +0200 Subject: [PATCH] added copy/paste from system clipboard in neovide --- lua/keymaps.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index d1db26d..2800418 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -53,6 +53,14 @@ vim.keymap.set('n', 'lo', 'copen', { desc = 'Quickfix [L]ist [O vim.keymap.set('n', '', 'cnext') vim.keymap.set('n', '', 'cprev') +if vim.g.neovide then + -- System clipboard keybinds in normal and visual mode + vim.keymap.set({ 'n', 'v' }, '', '"+y', { desc = 'Yank to System clipboard' }) + vim.keymap.set({ 'n', 'v' }, '', '"+p', { desc = 'Paste from System clipboard' }) + -- Clipboard for command mode + vim.keymap.set('c', '', '+', { desc = 'Paste from System clipboard' }) +end + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands`