From c18d278aaaa770073601e4f8a8528357177eb990 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 26 Feb 2024 17:13:57 -0600 Subject: [PATCH] feat(nvim): allow keyboard copy/paste in Neovide --- dots/.config/nvim/lua/neovide.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dots/.config/nvim/lua/neovide.lua b/dots/.config/nvim/lua/neovide.lua index 9b878e55..7c4648fb 100644 --- a/dots/.config/nvim/lua/neovide.lua +++ b/dots/.config/nvim/lua/neovide.lua @@ -1 +1,14 @@ vim.opt.linespace = -1 + +-- Allow clipboard copy paste in neovim +vim.keymap.set("n", "", ":w", { noremap = true, silent = true }) -- Save +vim.keymap.set("v", "", '"+y', { noremap = true, silent = true }) -- Copy +vim.keymap.set("n", "", '"+P', { noremap = true, silent = true }) -- Paste normal mode +vim.keymap.set("v", "", '"+P', { noremap = true, silent = true }) -- Paste visual mode +vim.keymap.set("c", "", "+", { noremap = true, silent = true }) -- Paste command mode +vim.keymap.set("i", "", 'l"+Pli', { noremap = true, silent = true }) -- Paste insert mode +vim.keymap.set('t', '', '"+Pi', { noremap = true, silent = true }) -- Paste terminal mode + +vim.api.nvim_set_keymap("", "", "+p", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("!", "", "+", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "", "+", { noremap = true, silent = true })