I use something simpler in my config that runs on BufWritePost:
silent !svgo %
I wrote that right after reading this koan:
Master Wq and the Markdown acolyte
A Markdown acolyte came to Master Wq to demonstrate his Vim plugin.
“See, master,” he said, “I have nearly finished the Vim macros that translate Markdown into HTML. My functions interweave, my parser is a paragon of efficiency, and the results nearly flawless. I daresay I have mastered Vimscript, and my work will validate Vim as a modern editor for the enlightened developer! Have I done rightly?”
Master Wq read the acolyte’s code for several minutes without saying anything. Then he opened a Markdown document, and typed:
:%!markdown
HTML filled the buffer instantly. The acolyte began to cry.
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>:
On terminals? like what?
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/
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>:I have a similar setup: https://github.com/davidmh/dot-files/blob/3b0e79919f231db1f3628f6fde06e9f78f347b87/nvim/fnl/own/plugin/toggle-term.fnl
ctrl+1-5for dedicated split termsalt+1-5for dedicated tab termsctrl+tas a wildcard split term, that's my go toalt+tto attach or start a tmux session in a tabI use a variation of that setup, I install plain neovim as a package, and symlink the neovim config: https://github.com/davidmh/dot-files/blob/main/home.nix#L115-L118
Mostly because I want to manage the neovim plugins with lazy.nvim, not with nix derivations.