From d7ac1f7213eee5c455d284355953ea410fd63f42 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 2 Apr 2024 22:38:41 +0100 Subject: [PATCH] Add termdebug :Asm mappings --- lua/commands.lua | 2 +- lua/mappings.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/commands.lua b/lua/commands.lua index ce4914e..0705ceb 100644 --- a/lua/commands.lua +++ b/lua/commands.lua @@ -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 diff --git a/lua/mappings.lua b/lua/mappings.lua index d713ec5..7e73256 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -52,6 +52,8 @@ local opts = { remap = false, silent = true } vim.keymap.set('n', '', ':Gdb:startinsert', opts) vim.keymap.set('n', '', ':Program', opts) vim.keymap.set('n', '', ':Source', opts) +vim.keymap.set('n', '', ':Asm', opts) vim.keymap.set('t', '', ':Gdb:startinsert', opts) vim.keymap.set('t', '', ':Program', opts) vim.keymap.set('t', '', ':Source', opts) +vim.keymap.set('t', '', ':Asm', opts)