diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 12101240..880ab2d3 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -126,8 +126,10 @@ if vim.fn.has("nvim-0.9.0") == 1 then end -- floating terminal -map("n", "ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" }) +local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end +map("n", "ft", lazyterm, { desc = "Terminal (root dir)" }) map("n", "fT", function() Util.float_term() end, { desc = "Terminal (cwd)" }) +map("n", "", lazyterm, { desc = "Terminal (root dir)" }) -- Terminal Mappings map("t", "", "", { desc = "Enter Normal Mode" }) @@ -136,6 +138,7 @@ map("t", "", "wincmd j", { desc = "Go to lower window"}) map("t", "", "wincmd k", { desc = "Go to upper window"}) map("t", "", "wincmd l", { desc = "Go to right window"}) map('t', '', [[]], { desc = "Terminal Window Mappings"}) +map("t", '', "close", {desc = "Hide Terminal"}) -- windows map("n", "ww", "p", { desc = "Other window", remap = true })