nixos/home/editor/neovim/keybinds.lua

27 lines
950 B
Lua

-- Keybinds
-- Term
vim.g.floaterm_keymap_toggle = '<leader>ft'
-- Tabs
vim.keymap.set('n', '<leader>n', ':tabnew<CR>',
{ silent = true, desc = '[N]ew tab' })
vim.keymap.set('n', '<leader>p', ':tabnext<CR>',
{ silent = true, desc = '[p]Next tab' })
vim.keymap.set('n', '<leader>P', ':tabprev<CR>',
{ silent = true, desc = '[P]Previous tab' })
-- Telescope
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
{ desc = '[?] FInd recently opened files' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep,
{ desc = '[F]ind by [G]rep' })
vim.keymap.set('n', '<leader>tt', ':tabnew<cr>')
vim.keymap.set('n', '<leader>tn', ':tabnext<cr>')
vim.keymap.set('n', '<leader>tp', ':tabprevious<cr>')