Add termdebug :Asm mappings

This commit is contained in:
Kenneth Benzie 2024-04-02 22:38:41 +01:00
parent 5de0109989
commit d7ac1f7213
2 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,7 @@ vim.api.nvim_create_user_command('TabWidth', function(opts)
vim.opt.softtabstop = width
end, { nargs = 1 })
-- :Remove the file associated with the current buffer, then delete the buffer
-- :Remove the file associated with the current buffer, bang to delete buffer
vim.api.nvim_create_user_command('Remove', function(opts)
local path = vim.fn.expand('%:p')
-- Using opts.bang in the callback can cause a SEGFAULT, instead use it

View File

@ -52,6 +52,8 @@ 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('n', '<C-w><C-a>', ':Asm<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)
vim.keymap.set('t', '<C-w><C-a>', '<C-\\><C-n>:Asm<CR>', opts)