added tabby and telescope tab for managing tabs in nvim
This commit is contained in:
parent
375591f85b
commit
e7b01ccca5
3 changed files with 157 additions and 3 deletions
19
init.lua
19
init.lua
|
|
@ -86,6 +86,7 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.opt.termguicolors = true
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
|
|
@ -93,18 +94,21 @@ vim.g.maplocalleader = ' '
|
|||
vim.opt.swapfile = false
|
||||
|
||||
-- Set to true if you have a Nerd Font installed
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- At default, neovim only display tabline when there are at least two tab pages. If you want always display tabline:
|
||||
vim.o.showtabline = true
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, for help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
|
@ -173,7 +177,16 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagn
|
|||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
--
|
||||
-- Tabby keymaps
|
||||
vim.api.nvim_set_keymap('n', '<leader>ta', ':$tabnew<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>tc', ':tabclose<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>to', ':tabonly<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>tn', ':tabn<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>tp', ':tabp<CR>', { noremap = true })
|
||||
-- move current tab to previous position
|
||||
vim.api.nvim_set_keymap('n', '<leader>tmp', ':-tabmove<CR>', { noremap = true })
|
||||
-- move current tab to next position
|
||||
vim.api.nvim_set_keymap('n', '<leader>tmn', ':+tabmove<CR>', { noremap = true })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue