⚙️ config(nvim): add new keymap for selecting all text within a file

This commit is contained in:
Sergio Laín 2023-12-07 02:29:58 +01:00
parent fc2eaa10bb
commit 62c4d8198e
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -48,9 +48,12 @@ map("n", "<leader>cie", "<cmd>LazyExtras<cr>", { desc = "Extras" })
map("n", "<a-h>", "_", { desc = "First character of Line" })
map("n", "<a-l>", "$", { desc = "Last character of Line" })
-- Copy whole file content to clipboard with C-y
-- Copy whole text to clipboard
map("n", "<C-c>", ":%y+<CR>")
-- Select all text
map("n", "<C-n>", "gg<S-V>G")
-- 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')