From 62c4d8198e9b9111b55c88231b8dac14d1cc7222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 7 Dec 2023 02:29:58 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20config(nvim):=20add=20new?= =?UTF-8?q?=20keymap=20for=20selecting=20all=20text=20within=20a=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/keymaps.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 9d238394..d311b37e 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -48,9 +48,12 @@ map("n", "cie", "LazyExtras", { desc = "Extras" }) map("n", "", "_", { desc = "First character of Line" }) map("n", "", "$", { desc = "Last character of Line" }) --- Copy whole file content to clipboard with C-y +-- Copy whole text to clipboard map("n", "", ":%y+") +-- Select all text +map("n", "", "ggG") + -- Better paste -- remap "p" in visual mode to delete the highlighted text without overwriting your yanked/copied text, and then paste the content from the unnamed register. map("v", "p", '"_dP')