diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2023-08-27 14:56:33 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2023-08-27 14:56:33 -0600 |
commit | 2e8a5a85148413304aadecc3d0f163ade47fe7c5 (patch) | |
tree | cce533d1bd054b69ae2d9f7a904c45c62502e1f8 /lua | |
parent | 36bc3b587bea9fc7f11615fe9233856ede24b9fd (diff) |
feat: add tab navigation keybinds, refactor which-key settings
Diffstat (limited to 'lua')
-rw-r--r-- | lua/config/keymap.lua | 8 | ||||
-rw-r--r-- | lua/plugins/init.lua | 2 | ||||
-rw-r--r-- | lua/plugins/which-key.lua | 9 |
3 files changed, 17 insertions, 2 deletions
diff --git a/lua/config/keymap.lua b/lua/config/keymap.lua index 6d99cfa..81b4498 100644 --- a/lua/config/keymap.lua +++ b/lua/config/keymap.lua @@ -20,3 +20,11 @@ vim.keymap.set('n', '<C-left>', '<CMD>vertical resize -5<CR>', { desc = 'Split: vim.keymap.set('n', '<C-down>', '<CMD>resize +5<CR>', { desc = 'Split: Resize down', noremap = true }) vim.keymap.set('n', '<C-up>', '<CMD>resize -5<CR>', { desc = 'Split: Resize up', noremap = true }) vim.keymap.set('n', '<C-right>', '<CMD>vertical resize +5<CR>', { desc = 'Split: Resize right', noremap = true }) + +-- Tab navigation +vim.keymap.set('n', '<leader>tn', '<CMD>tabnew<CR>', { desc = '[T]ab: [n]ew' }) +vim.keymap.set('n', '<leader>te', '<CMD>tabedit<Space>', { desc = '[T]ab: [e]dit'}) +vim.keymap.set('n', '<leader>td', '<CMD>tabclose<CR>', { desc = '[T]ab: [d]elete'}) +vim.keymap.set('n', '<leader>tl', '<CMD>tabnext<CR>', { desc = 'Tab: next'}) +vim.keymap.set('n', '<leader>th', '<CMD>tabprev<CR>', { desc = 'Tab: prev'}) + diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c0cf279..47427b0 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -5,8 +5,6 @@ return { -- Detect tabstop and shiftwidth automatically -- luevano: not sure how I feel about this, need to check later 'tpope/vim-sleuth', - -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, -- required for nvim-qt on windows diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 0000000..0947703 --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,9 @@ +return { + 'folke/which-key.nvim', + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, + opts = {} +} |