Fixed Mac Shortcut and use x instead of BS in v mode to blackhole

pull/128/head
flin16 2025-05-25 18:11:22 -05:00
parent daac5007d3
commit c266239459
1 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@ local function map_all_mode(lhs, rhs, opts)
vim.keymap.set("t", lhs, rhs, opts)
end
-- TODO: make this work
vim.keymap.set("v", "<BS>", '"_d', { noremap = true, desc = "Delete selection with Backspace" })
vim.keymap.set("v", "x", '"_x', { noremap = true, desc = "Delete selection with Backspace" })
map_all_mode("<F5>", function()
require("dap").continue()
end, { desc = "DAP: Continue" })
@ -45,8 +45,9 @@ map_all_mode("<D-w>", function()
end, { desc = "Close current tab" })
map_all_mode("<D-z>", function() vim.cmd("undo") end)
vim.keymap.set("i", "<D-v>", '<C-O>"+gP')
vim.keymap.set("c", "<D-v>", "<C-R>+")
vim.keymap.set("n", "<D-v>", '"+p', { desc = "Paste from clipboard" })
vim.keymap.set("v", "<D-v>", '"_d"+p', { desc = "Remove the selected part and paste from system clipboard." })
vim.keymap.set("v", "<D-v>", '"_d"+gP', { desc = "Remove the selected part and paste from system clipboard." })
vim.keymap.set("v", "<D-c>", '"+y', { desc = "Copy to clipboard in visual mode" })
vim.keymap.set("v", "<D-x>", '"+d', { desc = "Cut to clipboard" })
map_nv("<D-a>", "gg<S-v>G", { desc = "Select all" })