Improve keymaps

This commit is contained in:
Fernando Muñoz Paredes 2024-07-03 14:16:52 +02:00
parent 6587b0bba1
commit cb56070503
3 changed files with 25 additions and 63 deletions

View file

@ -7,13 +7,20 @@ return {
},
init = function()
vim.g.barbar_auto_setup = false
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
end,
opts = {
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
-- animation = true,
-- insert_at_start = true,
-- …etc.
},
opts = {},
version = '^1.0.0', -- optional: only update when a new 1.x version is released
},
}