diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 3a2f500..fdf93a9 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -13,11 +13,14 @@ local function map_all_mode(lhs, rhs, opts) keyset("i", lhs, rhs, opts) keyset("t", lhs, rhs, opts) end --- TODO: make this work --- keyset("v", "", function() --- vim.print("Pressed"); vim.cmd('d _') --- end, { noremap = true, desc = "Backspace in normal mode" }) -keyset("v", "x", '"_x', { noremap = true, desc = "Delete selection with Backspace" }) +-- Very fundamnetal changes for basic vanila Vim. Each change in this section need explanation. +-- Making c key less disruptive to normal coppying and pasting +map_nv("c", '"1c', { desc = "Change and put the deleted part into secondary clipboard" }) +-- Do the same for x key +map_nv("x", '"1x', { desc = "Delete and put the deleted part into secondary clipboard" }) +-- TODO: This is working now, but only for normal mode. For other mods, please use x key instead. +keyset("n", "", '"1d', { noremap = true, desc = "Backspace in normal mode" }) +keyset("v", "x", '"_x', { noremap = true, desc = "Delete without saving to clipboard" }) map_all_mode("", function() require("dap").continue() end, { desc = "Dap: Continue" }) @@ -60,6 +63,8 @@ keyset("i", "", "$", { desc = "Goto end" }) -- Now configure shortcuts for MacOS -- if vim.g.neovide then +keyset("n", "", "(YankyPreviousEntry)") +keyset("n", "", "(YankyNextEntry)") map_all_mode("", "w") -- Save map_all_mode("", function() local success, _ = pcall(function() diff --git a/lua/config/options.lua b/lua/config/options.lua index 728687c..a1e6e9f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -8,7 +8,6 @@ end vim.o.guifont = "Monaco:h16" vim.cmd("set wrap") local dap = require("dap") - dap.adapters.python = { type = "executable", command = "python",