From a65816730f3d78d7977388af5516105b1d1ef3e2 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Fri, 28 Jun 2024 21:54:13 +0300 Subject: Modified nvim config, added and organized keymaps and options --- .config/nvim/lua/keymaps.lua | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to '.config/nvim/lua/keymaps.lua') diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua index c043fc7..8501c64 100644 --- a/.config/nvim/lua/keymaps.lua +++ b/.config/nvim/lua/keymaps.lua @@ -1,15 +1,24 @@ -vim.keymap.set('n', '', 'nohlsearch') +-- Misc +vim.keymap.set({ 'n', 'i'}, '', 'ggVG', { desc = 'Visually Highlight [A]ll' }) +vim.keymap.set('n', '', ':nohlsearch') +-- Window Navigation vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Window resizing +local resize = 2; +vim.keymap.set('n', '', string.format(':vertical resize -%d', resize), { desc = "Resize Left" }) +vim.keymap.set('n', '', string.format(':resize -%d', resize), { desc = "Resize Up" }) +vim.keymap.set('n', '', string.format(':resize +%d', resize), { desc = "Resize Down" }) +vim.keymap.set('n', '', string.format(':vertical resize +%d', resize), { desc = "Resize Right" }) +-- Keep selection after < and > +vim.keymap.set('v', '<', '', '>gv', {}) - - - - - +-- todo.lua +vim.keymap.set('n', 'ft', ':TodoTelescope', { desc = "[F]ind [T]odos" }) -- cgit v1.3.1