From d125b338bb437ee38aed99e39893db01589e4589 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 31 Jan 2024 01:45:45 +0300 Subject: [PATCH] Nvim : Add y to copy to the sys clipboard. --- .config/nvim/lua/key/Common.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.config/nvim/lua/key/Common.lua b/.config/nvim/lua/key/Common.lua index 212a444..4f27d31 100644 --- a/.config/nvim/lua/key/Common.lua +++ b/.config/nvim/lua/key/Common.lua @@ -6,16 +6,12 @@ function bye() vim.cmd[[qa!]] end -rekey_normal('.', '@:') -- repeat command. -rekey_visual('.', '@:') -- repeat command. -rekey_normal('zz', 'wa') -- save all files. -rekey_normal('z', 'lua bye()') -- save & quit all. -rekey_normal('v', 'v') -- visual select (duplicate). -rekey_normal('gh', '0') -- go left. -rekey_normal('gl', '$') -- go right. -rekey_normal('gj', 'G') -- go bottom. -rekey_normal('gk', 'gg') -- go top. -rekey_normal('U', '') -- redo. +rekey_normal('.', '@:') -- Repeat command. +rekey_visual('.', '@:') -- Repeat command. +rekey_normal('zz', 'wa') -- Save all files. +rekey_normal('z', 'lua bye()') -- Save & quit all. +rekey_normal('v', 'v') -- Visual select (duplicate). +rekey_normal('y', '"+y') -- Copy to system clipboard. rekey_normal(';', ':') -- remap ; to :. rekey_visual(';', ':') -- remap ; to :.