From 11d0840dba8466b4e9d85a182b5dbe9c656a2f3a Mon Sep 17 00:00:00 2001 From: Luke Johnson Date: Thu, 9 Mar 2023 12:59:38 -0700 Subject: [PATCH] clear --- after/plugin/defaults.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/after/plugin/defaults.lua b/after/plugin/defaults.lua index 049a4a9a..d9f5ef3c 100644 --- a/after/plugin/defaults.lua +++ b/after/plugin/defaults.lua @@ -37,10 +37,20 @@ vim.keymap.set("n", "", "zz", { desc = 'Scroll up' }) vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") +-- Use "y" if you want the yank to go to the system register, otherwise yank only applies to nvim +vim.keymap.set({ "n", "v" }, "y", [["+y]], { desc = 'Yank to system clipboard' }) +vim.keymap.set("n", "Y", [["+Y]], { desc = 'Yank to end of line into system clipboard' }) + +-- Use "dd" to delete without saving to a register +vim.keymap.set({ "n", "v" }, "d", [["_d]]) -- When highlighting a word and pasting over it, don't lose current register value vim.keymap.set("x", "pp", [["_dP]], { desc = 'Paste without losing register' }) +-- Navigate quick fix commands +vim.keymap.set("n", "k", "lnextzz") +vim.keymap.set("n", "j", "lprevzz") + -- Set terminal keymaps vim.keymap.set('t', '', [[]]) vim.keymap.set('t', 'jk', [[]]) @@ -85,7 +95,8 @@ vim.o.mouse = 'a' -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.o.clipboard = 'unnamedplus' +-- I'm going to use a keymap "y" for system clipboard to keep the two separate +-- vim.o.clipboard = 'unnamedplus' -- Enable break indent vim.o.breakindent = true