(s)tupid (term)inal. Toggle between showing and hiding a neovim terminal buffer.
Using packer.nvim, add this to
your use
section:
use 'Hvassaa/sterm.nvim'
Add a keymap to toggle the terminal, customize as needed:
vim.keymap.set({'t', 'n'}, "<F5>", require('sterm').toggle, { silent=true })
By default, sterm will make a vertical split to show the terminal. You can change this by
require('sterm').setup({
split_direction = "right" -- right, left, up or down
})
Sorry, it cannot do much:
- It is not really configurable
- It cannot float
- It is not that flashy or cool
- It shows and hides a terminal window
- It is kind of stupid
- But is only ~50 LOC