From 878bd5748e8f30cd018832a1baa20ba639782bb0 Mon Sep 17 00:00:00 2001 From: venus Date: Wed, 14 Jan 2026 07:37:23 -0600 Subject: [PATCH] added more robust commands for compiling in terminal --- init.lua | 6 ++++++ lua/plugins/simple.lua | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index dca9449..56d5b2f 100644 --- a/init.lua +++ b/init.lua @@ -67,6 +67,12 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) + +-- run clear and make in open terminal +vim.keymap.set('n','r','TermExec cmd="clear && make"', { desc = '[r]un make in terminal' }) +vim.keymap.set('n','n', 'ToggleTerm direction=vertical name=compile size=70', { desc = 'open a [n]ew terminal' }) +vim.keymap.set('n','t', 'ToggleTerm', {desc = '[T]oggle all terminals'}) + -- TIP: Disable arrow keys in normal mode vim.keymap.set('n', '', 'echo "Use h to move!!"') vim.keymap.set('n', '', 'echo "Use l to move!!"') diff --git a/lua/plugins/simple.lua b/lua/plugins/simple.lua index a768d83..d44d0dc 100644 --- a/lua/plugins/simple.lua +++ b/lua/plugins/simple.lua @@ -11,7 +11,6 @@ return { 'nvim-tree/nvim-web-devicons', -- nerdfont! 'nvim-lualine/lualine.nvim', -- lualine 'TamaMcGlinn/vim-termhere', --simple terminal QOL - { "denialofsandwich/sudo.nvim", dependencies = { "MunifTanjim/nui.nvim", - },config = true, - } + { "denialofsandwich/sudo.nvim", dependencies = { "MunifTanjim/nui.nvim", },config = true, }, + {'akinsho/toggleterm.nvim', version = "*", config = true} }