diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-06-28 21:54:13 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-06-28 21:54:13 +0300 |
| commit | a65816730f3d78d7977388af5516105b1d1ef3e2 (patch) | |
| tree | 0b7adb253c3dfd02837c857688878143c5cf8c0d /.config/nvim/lua/keymaps.lua | |
| parent | afa93731292be10d8a22fc700c150a701c74d068 (diff) | |
Modified nvim config, added and organized keymaps and options
Diffstat (limited to '.config/nvim/lua/keymaps.lua')
| -rw-r--r-- | .config/nvim/lua/keymaps.lua | 21 |
1 files changed, 15 insertions, 6 deletions
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', '<Esc>', '<cmd>nohlsearch<CR>') +-- Misc +vim.keymap.set({ 'n', 'i'}, '<C-a>', '<Esc>ggVG', { desc = 'Visually Highlight [A]ll' }) +vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>') +-- Window Navigation vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) +-- Window resizing +local resize = 2; +vim.keymap.set('n', '<C-Left>', string.format(':vertical resize -%d<CR>', resize), { desc = "Resize Left" }) +vim.keymap.set('n', '<C-Up>', string.format(':resize -%d<CR>', resize), { desc = "Resize Up" }) +vim.keymap.set('n', '<C-Down>', string.format(':resize +%d<CR>', resize), { desc = "Resize Down" }) +vim.keymap.set('n', '<C-Right>', string.format(':vertical resize +%d<CR>', resize), { desc = "Resize Right" }) +-- Keep selection after < and > +vim.keymap.set('v', '<', '<gv', {}) +vim.keymap.set('v', '>', '>gv', {}) - - - - - +-- todo.lua +vim.keymap.set('n', '<leader>ft', ':TodoTelescope<cr>', { desc = "[F]ind [T]odos" }) |
