zbirenbaum / nvterm

NvChad's Official Terminal Plugin ( Unmaintained but still usable and stable), wait for v3.0
GNU General Public License v3.0
178 stars 21 forks source link

Feature Request: Toggle All Terminals #17

Closed shaun-mathew closed 2 years ago

shaun-mathew commented 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.

siduck commented 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

shaun-mathew commented 2 years ago

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.

2022-08-14_01-04

Edit:

I've submitted a pull request if that makes the intended functionality clearer

siduck commented 2 years ago

oh those terminals are from the spawn terminal function right?

shaun-mathew commented 2 years ago

Yes

siduck commented 2 years ago

merged, i'll add a mapping for this in nvchad repo soon

marko911 commented 1 year ago

The mapping doesnt work for me. I press Option+H and nothing happens. Anyone have a clue ?

siduck commented 1 year ago

@marko911 I don't remember if I added mapping for this, did you run that toggle function?

marko911 commented 1 year ago

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",
    },
  },
siduck commented 1 year ago

these are the default ones, check the function which was added in @shaun-mathew 's PR