mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nvim): keymap cleanup
This commit is contained in:
parent
0245e8a680
commit
8aaa3aed7d
8 changed files with 39 additions and 50 deletions
|
|
@ -5,32 +5,32 @@ vim.g.bufferline = {
|
|||
icon_pinned = '',
|
||||
}
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
-- Move to previous/next
|
||||
map('n', 'gT', '<Cmd>BufferPrevious<CR>', opts)
|
||||
map('n', 'gt', '<Cmd>BufferNext<CR>', opts)
|
||||
map('n', '<A-{>', '<Cmd>BufferPrevious<CR>', opts)
|
||||
map('n', '<A-}>', '<Cmd>BufferNext<CR>', opts)
|
||||
vim.keymap.set('n', 'gT', '<Cmd>BufferPrevious<CR>', { noremap = true, silent = true, desc = "Last tab" })
|
||||
vim.keymap.set('n', 'gt', '<Cmd>BufferNext<CR>', { noremap = true, silent = true, desc = "Next tab" })
|
||||
vim.keymap.set('n', '<A-{>', '<Cmd>BufferPrevious<CR>', { noremap = true, silent = true, desc = "Last tab" })
|
||||
vim.keymap.set('n', '<A-}>', '<Cmd>BufferNext<CR>', { noremap = true, silent = true, desc = "Last tab" })
|
||||
|
||||
-- Re-order to previous/next
|
||||
map('n', '<C-{>', '<Cmd>BufferMovePrevious<CR>', opts)
|
||||
map('n', '<C-}>', '<Cmd>BufferMoveNext<CR>', opts)
|
||||
vim.keymap.set('n', '<C-{>', '<Cmd>BufferMovePrevious<CR>',
|
||||
{ noremap = true, silent = true, desc = "Move tab to the left" })
|
||||
vim.keymap.set('n', '<C-}>', '<Cmd>BufferMoveNext<CR>',
|
||||
{ noremap = true, silent = true, desc = "Move tab to the right" })
|
||||
|
||||
-- Goto buffer in position...
|
||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
|
||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
|
||||
vim.keymap.set('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', { noremap = true, silent = true, desc = "Goto tab 1" })
|
||||
vim.keymap.set('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', { noremap = true, silent = true, desc = "Goto tab 2" })
|
||||
vim.keymap.set('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', { noremap = true, silent = true, desc = "Goto tab 3" })
|
||||
vim.keymap.set('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', { noremap = true, silent = true, desc = "Goto tab 4" })
|
||||
vim.keymap.set('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', { noremap = true, silent = true, desc = "Goto tab 5" })
|
||||
vim.keymap.set('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', { noremap = true, silent = true, desc = "Goto tab 6" })
|
||||
vim.keymap.set('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', { noremap = true, silent = true, desc = "Goto tab 7" })
|
||||
vim.keymap.set('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', { noremap = true, silent = true, desc = "Goto tab 8" })
|
||||
vim.keymap.set('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', { noremap = true, silent = true, desc = "Goto tab 9" })
|
||||
vim.keymap.set('n', '<A-0>', '<Cmd>BufferLast<CR>', { noremap = true, silent = true, desc = "Goto last tab" })
|
||||
|
||||
-- Pin/unpin buffer
|
||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
|
||||
vim.keymap.set('n', '<A-p>', '<Cmd>BufferPin<CR>', { noremap = true, silent = true, desc = "Pin tab" })
|
||||
|
||||
-- Close buffer
|
||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
|
||||
vim.keymap.set('n', '<A-c>', '<Cmd>BufferClose<CR>', { noremap = true, silent = true, desc = "Close tab" })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue