diff --git a/init.lua b/init.lua index 47ccc70a..b3a912bb 100644 --- a/init.lua +++ b/init.lua @@ -240,6 +240,8 @@ vim.keymap.set({ 'n' }, ']b', 'bnext', { silent = true }) vim.keymap.set({ 'n' }, '[b', 'bprev', { silent = true }) -- vim.keymap.set({ 'n', 'i', 'v' }, '', 'bnext', { silent = true }) -- vim.keymap.set({ 'n', 'i', 'v' }, '', 'bprev', { silent = true }) +-- Close all buffers and keep the open one only +vim.keymap.set('n', 'b', ':%bd|e#|bd#', { desc = 'Close all buffers and keep the open one only' }) -- Enable number in netrw vim.g.netrw_bufsettings = 'noma nomod nu rnu nobl nowrap ro' @@ -932,11 +934,11 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + -- [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - -- [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = false }, --[''] = cmp.mapping.select_next_item(), --[''] = cmp.mapping.select_prev_item(),