From c0a98ab1876f29ca7adc6ca78a85a5871977c2f0 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sat, 6 May 2023 20:31:52 +0200 Subject: Add Terminal keys for exiting, switching windows and couple of nvim-dap keys, changed toggle diff keybinding --- lua/user/keys.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index ad9ca6d..8e16d03 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -79,6 +79,14 @@ map("n", "%", ":NumbersOnOff") --map("n", "", "") --map("n", "", "") --map("n", "", "") +map("t", "", "") +map("t", "", "") +map("t", "", "") +map("t", "", "") +map("t", "", "") +map("t", "", "") +map("n", "", "") +--map("n", "", ":call MyFunc(v:count)") -- Split window map("n", "h", ":split") @@ -147,7 +155,7 @@ map("n", "", ':let save_a=@a"add"ap:let @a=save_a') map("v", "sr", 'y:%s/"//gc') -- Toggle Diff -map("n", "dt", "call utils#ToggleDiff()") +map("n", "td", "call utils#ToggleDiff()") -- Map delete to Ctrl+l map("i", "", "") @@ -163,7 +171,7 @@ map("v", "p", '"_dP') -- Swap two pieces of text, use x to cut in visual mode, then use Ctrl-x in -- visual mode to select text to swap with -map("v", "", "`.``gvP``P") +--map("v", "", "`.``gvP``P") -- Change Working Directory to current project map("n", "cd", ":cd %:p:h:pwd") @@ -358,14 +366,20 @@ end) -- Set breakpoints, get variable values, step into/out of functions, etc. map("n", "dl", require("dap.ui.widgets").hover) map("n", "dc", dap.continue) +map("n", "dC", dap.close) +map("n", "dt", dap.terminate) map("n", "db", dap.toggle_breakpoint) map("n", "dn", dap.step_over) map("n", "di", dap.step_into) map("n", "do", dap.step_out) -map("n", "dC", function() +map("n", "dB", function() dap.clear_breakpoints() require("notify")("Breakpoints cleared", "warn") end) +--vim.keymap.set("n", "B", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))") +--vim.keymap.set("v", "B", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))") +--vim.keymap.set("n", "lp", ":lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))") +--vim.keymap.set("n", "dr", ":lua require'dap'.repl.open()") -- Close debugger and clear breakpoints map("n", "de", function() -- cgit v1.2.3