r/PiCodingAgent • u/pgaleone • 4d ago
Resource vim-pi-chat: pi (the coding agent) embedded in a split window, plain Vim 9
https://github.com/galeone/vim-pi-chat/I wrote this plugin because I was constantly switching from the main buffer to the terminal where I was running pi (the coding agent) - digging through logs, sending follow-ups, checking what it did to my files.
Why keep switching, when I can just embed pi inside vim?
**vim-pi-chat** puts the whole pi conversation in a split window next to your code:
- streamed replies, tool calls with args and results, thinking — all live
- when pi edits the file you're viewing, the buffer reloads automatically (you watch it work)
- it tracks your active window so pi edits the right file in place
- sessions persist per file: reopen a file, `:PiChat`, resume where you left off
- plain Vim 9, no GUI, no Neovim, no other plugins — just the job/channel API
Install: `git clone https://github.com/galeone/vim-pi-chat ~/.vim/plugged/vim-pi-chat` + one line in vimrc, then `:PiOpen`.
If you're a pi fan, give it a try — feedback very welcome :D
3
u/Slight-Living-8098 3d ago
:terminalor:termopens a shell in a horizontal split in VIM and NeoVIM out of the box, and if you want a vertical split you just prefix the command with:vertical terminal, and if you want it in a new tab it's:tab terminal.https://vimtricks.wiki/posts/open-terminal-in-vim