all repos — nixfiles @ cb9dbecb7080f5989e5bcc07959c719ee05cea81

System and user configuration, managed by nix and home-manager

neovim: add keybinds for copy/paste to system clipboard
Alan Pearce alan@alanpearce.eu
Tue, 25 Apr 2023 21:42:45 +0200
commit

cb9dbecb7080f5989e5bcc07959c719ee05cea81

parent

a5a38243c7795fe4638838c4e2f5618ad9b5c953

1 files changed, 10 insertions(+), 0 deletions(-)

jump to
M user/nvim/init.luauser/nvim/init.lua
@@ -9,6 +9,16 @@ vim.g.mapleader = ","
 
 local keyset = vim.keymap.set
+
+keyset("v", "<leader>y", "\"+y", {})
+keyset("n", "<leader>Y", "\"+yg_", {})
+keyset("n", "<leader>y", "\"+y", {})
+
+keyset("v", "<leader>p", "\"+p", {})
+keyset("v", "<leader>P", "\"+P", {})
+keyset("n", "<leader>p", "\"+p", {})
+keyset("n", "<leader>P", "\"+P", {})
+
 -- Autocomplete
 function _G.check_back_space()
     local col = vim.fn.col('.') - 1