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', '<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)