Add termdebug mappings

This commit is contained in:
Kenneth Benzie 2024-03-17 23:33:44 +00:00
parent 0feee4afbf
commit 0c1328ead4

View File

@ -46,3 +46,12 @@ vim.cmd('unmap Y')
-- Make nvim :terminal more like vim :terminal
vim.keymap.set('t', '<C-w>N', '<C-\\><C-n>', { remap = true })
-- Mappings to make navigating :Termdebug
local opts = { remap = false, silent = true }
vim.keymap.set('n', '<C-w><C-g>', ':Gdb<CR>:startinsert<CR>', opts)
vim.keymap.set('n', '<C-w><C-e>', ':Program<CR>', opts)
vim.keymap.set('n', '<C-w><C-s>', ':Source<CR>', opts)
vim.keymap.set('t', '<C-w><C-g>', '<C-\\><C-n>:Gdb<CR>:startinsert<CR>', opts)
vim.keymap.set('t', '<C-w><C-e>', '<C-\\><C-n>:Program<CR>', opts)
vim.keymap.set('t', '<C-w><C-s>', '<C-\\><C-n>:Source<CR>', opts)