diff --git a/user/app/nvim/lua/mappings.lua b/user/app/nvim/lua/mappings.lua index 17f4517..b074c8b 100644 --- a/user/app/nvim/lua/mappings.lua +++ b/user/app/nvim/lua/mappings.lua @@ -17,10 +17,27 @@ vim.keymap.set("n", "", function() end) map("n", ";", ":", { desc = "CMD enter command mode" }) -map({"n", "v", "i"}, "", ":", { desc = "CMD enter command mode" }) +map({"n", "t", "v", "i"}, "", ":", { desc = "CMD enter command mode" }) +map({"n", "t", "v", "i"}, "", "", { desc = "up" }) +map({"n", "t", "v", "i"}, "", "", { desc = "down" }) +map({"n", "t", "v", "i"}, "", "h", { desc = "switch window left" }) +map({"n", "t", "v", "i"}, "", "l", { desc = "switch window right" }) +map({"n", "t", "v", "i"}, "", "j", { desc = "switch window down" }) +map({"n", "t", "v", "i"}, "", "k", { desc = "switch window up" }) map("n", ".", "Telescope find_files", { desc = "telescope find files" }) +map("n", "/", "Telescope live_grep", { desc = "telescope live grep" }) map("n", "gg", "Neogit", { desc = "Neogit status buffer" }) +map("n", "c", "gcc", { desc = "Toggle Comment", remap = true }) +map("v", "c", "gc", { desc = "Toggle comment", remap = true }) map("n", "pp", "Telescope workspaces", { desc = "telescope workspaces" }) +map("n", "ws", "split", { desc = "horizontal split" }) +map("n", "wS", "split", { desc = "horizontal split" }) +map("n", "wv", "vsplit", { desc = "vertical split" }) +map("n", "wV", "vsplit", { desc = "vertical split" }) +map({ "n", "t", "i", "v" }, "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) +map({ "n", "t", "i", "v" }, "", function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } +end, { desc = "terminal toggleable horizontal term" }) map("i", "jk", "") -- map({ "n", "i", "v" }, "", " w ")