1
0
mirror of https://github.com/pratiktri/dotfiles.git synced 2026-05-06 19:43:40 +05:30

chore(nvim): Disable Ctrl+p to paste in edit mode

- `Ctrl+p` always gets accidentally pressed when trying to escape with
  `Ctrl+[` - disable it
This commit is contained in:
Pratik Tripathy
2026-04-21 11:53:30 +05:30
parent f1129233d1
commit 8fb3f6ea0b
@@ -9,6 +9,8 @@ vim.keymap.set({ "n" }, "<C-,>", "<cmd>edit " .. vim.fn.expand(vim.fn.stdpath("c
vim.keymap.set({ "n", "v" }, "<leader>y", '"+y', { desc = "Copy to system clipboard" })
vim.keymap.set({ "n", "v" }, "<leader>p", '"+p', { desc = "Paste from system clipboard" })
-- Disable [Ctrl + p] to paste in edit mode; avoids accidentally pressing `p` when actually doing `Ctrl + [`
vim.keymap.set("i", "<C-p>", "<Nop>", { noremap = true, silent = true })
-- Remap for dealing with word wrap
vim.keymap.set({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })