Closed shaun-mathew closed 2 years ago
Currently you can only toggle the last open terminal, but I would like to toggle all terminals in the case you have multiple terminal windows open.
there will only be 3 toggleable terminals available, (float,horizontal, vertical) are u talking about that
Say I have 1 horizontal terminal and two vertical terminals sat the bottom open at once or multiple, I want to be able to toggle their state all at once.
Edit:
I've submitted a pull request if that makes the intended functionality clearer
oh those terminals are from the spawn terminal function right?
Yes
merged, i'll add a mapping for this in nvchad repo soon
The mapping doesnt work for me. I press Option+H and nothing happens. Anyone have a clue ?
@marko911 I don't remember if I added mapping for this, did you run that toggle function?
in mappings.lua
:
M.nvterm = {
plugin = true,
t = {
-- toggle in terminal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"toggle vertical term",
},
},
these are the default ones, check the function which was added in @shaun-mathew 's PR
Currently you can only toggle the last open terminal, but I would like to toggle all terminals in the case you have multiple terminal windows open.