I’m having a hard time opening side-by-side terminals
Side-by-side how? the way I imagine this is starting with a single window with a regular buffer, then opening two toggleterm terminals in splits to end up like this:
If that’s what you mean, all you need is to pass unique terminal ids as you call ToggleTerm
.
:ToggleTerm 1<CR>
:ToggleTerm 2<CR>
You could then map that to whatever keys you want, like <c-1>
and <c-2>
:
vim.keymap.set('n', '<c-1>', ':ToggleTerm 1<CR>')
vim.keymap.set('n', '<c-2>', ':ToggleTerm 2<CR>')
I have a similar setup: https://github.com/davidmh/dot-files/blob/3b0e79919f231db1f3628f6fde06e9f78f347b87/nvim/fnl/own/plugin/toggle-term.fnl
ctrl
+1-5
for dedicated split termsalt
+1-5
for dedicated tab termsctrl
+t
as a wildcard split term, that’s my go toalt
+t
to attach or start a tmux session in a tab
I use something simpler in my config that runs on
BufWritePost
:silent !svgo %
I wrote that right after reading this koan:
https://blog.sanctum.geek.nz/vim-koans/