From 7cd4496fdbf08f690055dc175277c7dd36a53744 Mon Sep 17 00:00:00 2001 From: psychhim Date: Fri, 10 Oct 2025 22:27:28 +0530 Subject: [PATCH] Fix: some comments --- lua/keymaps.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index e89a8a4..bdef5ce 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -263,7 +263,7 @@ vim.keymap.set('x', 'Y', function() require('copy_to_clipboard_fix').trim_clipboard() end, { noremap = true, silent = true }) --- [[ Paste from clipboard with line count ]] +-- [[ Paste from clipboard inline with line count ]] local function paste_from_clipboard() -- Get clipboard lines local lines = vim.fn.getreg('+', 1, true) @@ -319,8 +319,8 @@ end vim.keymap.set('n', 'P', paste_from_clipboard, { desc = 'Paste from clipboard before cursor' }) vim.keymap.set('x', 'P', paste_from_clipboard, { desc = 'Paste clipboard over selection' }) --- [[ Paste Neovim yanks ]] --- In Normal Mode before cursor inline +-- [[ Paste Neovim yanks inline ]] +-- In Normal Mode before cursor vim.keymap.set('n', 'p', function() local lines = vim.fn.getreg('"', 1, true) -- get as list of lines if vim.tbl_isempty(lines) then @@ -350,7 +350,6 @@ vim.keymap.set('x', 'p', function() -- Force the unnamed register to characterwise local reg = vim.fn.getreg('"', 1, true) -- get list of lines vim.fn.setreg('"', table.concat(reg, '\n'), 'c') -- set as charwise - vim.cmd 'normal! "_dP' -- paste over selection vim.cmd 'normal! `]' -- move to end of pasted text end, { desc = 'Paste over selection without yanking' })