Open shivkar2n opened 1 year ago
+1
Agreed. For now, this is how I configured it in Lua (using Lazy.nvim) in my Neovim setup:
keys = {
"<leader>`",
function()
if vim.fn["floaterm#terminal#get_bufnr"]("quake") < 0 then
vim.cmd.FloatermNew({
"--height=0.3",
"--wintype=split",
"--name=quake",
"--autoclose=2",
"--title=Quake"
})
else
vim.cmd.FloatermToggle("quake")
end
end,
mode = {'n', 'i', 't'},
desc="Quake terminal"
}
It checks whether a terminal with a given name exists already, and acts accordingly
Hey first of all thanks for the awesome plugin!
I usually have a vs-code style terminal docked at the bottom of my editor which is called by command
But when I run
:FloatermToggle
with no float-terminal initially open, it create a new floating terminal with the default properties.Is there a way to toggle so that if no terminal exists then it opens one as specified above?