From b66dcdcec7d9ec7976c6beaffe3799e6e7c75e17 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:09:20 +0100 Subject: [PATCH] [nvim] feat: smart pasting in visual mode --- .config/nvim/lua/maps.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index a6afe95..1dfb8ef 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -35,6 +35,11 @@ vim.keymap.set("n", "p", "\"+P", { desc = "Copy from clipboard"} ) +vim.keymap.set("x", "p", + "\"_dP", + { desc = "Send selection to void register and paste from clipboard" } +) + vim.keymap.set("n", "", "w! | !compiler %", { desc = "Compile current file using ~/.local/bin/compiler"}