From 8219bade804ad4b031542d8c872393c0fd47b211 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 1 Feb 2024 09:48:34 -0800 Subject: [PATCH] add terminal keymaps --- lua/core/keymaps.lua | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua index aae1048..770d0b0 100644 --- a/lua/core/keymaps.lua +++ b/lua/core/keymaps.lua @@ -60,9 +60,20 @@ end, "Toggle between light and dark themes") map("n", "ur", "nohl", "Clear highlights") -- Open config -map("n", "Nc", "n ~/.config/nvim/init.lua", "Open Config") +map("n", "Nc", "tabnew ~/.config/nvim/init.lua", "Open Config") --- ToggleTerm config +-- Open Common Files +map("n", "fm", "tabnew ~/vex/roberts", "Open Roberts") +map("n", "fp", "tabnew ~/vex/patch", "Open Patch") + +-- New Tab Terminal (for more perminent use) +map("n", "ft", "tabf term://fish", "Open New Terminal") +map("t", "", "", "Return to normal mode") +map("t", "", "gt", "Go to next tab") +map("t", "", "q", "Close current terminal") + + +-- Lazygit config local Terminal = require('toggleterm.terminal').Terminal local lazygit = Terminal:new({cmd = "lazygit", hidden = true, direction='tab'}) @@ -78,3 +89,11 @@ function _bacon_toggle() bacon:toggle() end map("n", "h", "lua _bacon_toggle()", "open bacon") + +-- Wiki-tui config +local wiki = Terminal:new({cmd = "wiki-tui", hidden = true, direction='tab'}) + +function _wiki_toggle() + wiki:toggle() +end +map("n", "sl", "lua _wiki_toggle()", "open wiki-tui")