X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4699d3ea52ee17894f21343803f06c89d0859a7f..fa17f6dc11ab3a15f051dee0172f296fd0f2cf9d:/nvim/lua/config/keymaps.lua diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 56035d6..1e71154 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -1,4 +1,6 @@ -- Keymaps are automatically loaded on the VeryLazy event +-- NOTE: Default LazyVim keys are not loaded automatically, review upstream keymas occasionnaly. +-- ~/.local/share/nvim/lazy/LazyVim/lua/lazyvim/config/keymaps.lua local Util = require("lazyvim.util") @@ -12,6 +14,7 @@ vim.keymap.set("n", "", "vertical resize +2", { desc = "Increa -- Move Lines vim.keymap.set("n", "", "m .+1==", { desc = "Move down" }) vim.keymap.set("n", "", "m .-2==", { desc = "Move up" }) +-- NOTE: this triggers with when I'm too quick at doing "go to normal mode then move line" vim.keymap.set("i", "", "m .+1==gi", { desc = "Move down" }) vim.keymap.set("i", "", "m .-2==gi", { desc = "Move up" }) vim.keymap.set("v", "", ":m '>+1gv=gv", { desc = "Move down" }) @@ -87,3 +90,12 @@ end local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end vim.keymap.set("n", "ft", lazyterm, { desc = "Terminal (Root Dir)" }) vim.keymap.set("n", "fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" }) + +-- Terminal Mappings +vim.keymap.set("t", "", "", { desc = "Enter Normal Mode" }) +vim.keymap.set("t", "", "wincmd h", { desc = "Go to Left Window" }) +vim.keymap.set("t", "", "wincmd j", { desc = "Go to Lower Window" }) +vim.keymap.set("t", "", "wincmd k", { desc = "Go to Upper Window" }) +vim.keymap.set("t", "", "wincmd l", { desc = "Go to Right Window" }) +vim.keymap.set("t", "", "close", { desc = "Hide Terminal" }) +vim.keymap.set("t", "", "close", { desc = "which_key_ignore" })