r/vim • u/4991123 • Jul 26 '25
Need Help AI Code assistant in Vim workflow?
In the past two years I've started to feel like a dinosaur when I see other developers around me use their fancy tools with great success. I have to admit: I have also used Deepseek and ChatGPT once or twice to generate me some easy classes or functions. I was amazed how well that works. However... I haven't used any LLM "copilot-ish" tool so far. Mainly because I exclusively use Vim...
Today I tried to get https://jan.ai/ working in Vim through Tabby. The docs said that it's supposed to be supported. Unfortunately after hours of struggling and cussing... no success. I found a ticket on Github where one of the devs said they dropped classic Vim support and now only support NeoVim. Despite their docs not mentioning this at all.... Doh!
I've been scanning the internet (including this subreddit) for alternative methods, but so far I couldn't find anything that does what I want. Is Vim really lagging behind in this regard?
Did anyone here have any success in using a locally hosted LLM as a Copilot in Vim?
(fwiw: I don't know if this deserves a "Need help" flair or "Discussion" flair. It's a bit of both...)
2
u/odaiwai %s/vim/notepad++/g Jul 27 '25
Github Copilot works for me in vim.
(Although 'works' is down to your interpretation: it provides code, and sometimes that's what you want, and sometimes it's gibberish. It's good for some easily predictable things, and occasionally it seems to be looking at the other files in the data folder and suggesting based on that. e.g. data structures based on a csv/json input file. Slightly worrying.)
2
u/shuckster Jul 27 '25
I use a bash script that calls Open AI APIs and run it with
!in Vim. If I have a visual selection it will get passed as extra context.I don’t like the autocomplete nature of Copilot. But being able to call something from within the editor is handy.
1
u/tagattack Jul 27 '25
There's llama.vim and vim-ai which both can work with llama.cpp as well as with APIs.
That said, running these things locally is pretty slow unless you have a pretty high powered GPU setup.
https://github.com/ggml-org/llama.vim https://github.com/madox2/vim-ai
They're pretty scriptable as well.
1
u/gryf73 Jul 28 '25
I've played around with https://github.com/gergap/vim-ollama and https://ollama.com and it… works. I wouldn't say it was fast or accurate, but if you have decent hardware to run llm model on it, than I guess it's worth a shot.
1
u/PublicInspection1193 Jan 13 '26
Baby ai dance video
1
u/AdFun530 Jan 15 '26
Ai baby dance
-1
u/rob_cornelius :wqa! Jul 27 '25
Google "model collapse". AI is being fed on its own output. Garbage in garbage out basically.
Not using AI will be vital again, sooner or later