Vim users finally get their own :AI command
A Vim/Neovim plugin that turns OpenAI's API into native editor commands—complete, edit, chat, and even generate images without leaving the buffer.

What it does
vim-ai wires OpenAI-compatible APIs into Vim and Neovim through a handful of ex-commands. :AI completes text or code, :AIEdit rewrites your selection in place, :AIChat opens an interactive conversation, and :AIImage generates images from prompts. It requires Python3 support and an API key, and it only sends what you explicitly select—no background code exfiltration.
The interesting bit
The plugin treats AI interactions as first-class Vim citizens rather than bolted-on side panels. The .aichat file format is the standout: you write prompts in plain text with >>> user and >>> include sections, save them, rerun them, even embed shell command output with >>> exec. It’s reproducible prompt engineering inside your editor, not a chat widget that forgets everything when you close the tab.
Key highlights
- Role system: Define reusable prompts and model configs in an
.inifile, then invoke with:AIEdit /grammaror stack roles like:AI /o1-mini /grammar - Provider plugins: Extensible architecture; currently supports Google Gemini, OpenAI Responses API, and MCP via separate plugins
- Vision and images: Include image files in chat for vision analysis; generate images with
:AIImage - OpenRouter/LiteLLM support: Use any OpenAI-compatible proxy to access free or local models
- Buffer-local config: Override model, temperature, tokens per-command or per-chat directly in the buffer header
Caveats
- Requires Vim/Neovim compiled with Python3 support—not universal
- Provider plugin ecosystem is young; the README literally asks people to write more
- API costs are your own problem; no token limits are enforced by the plugin
Verdict
Worth a look if you live in Vim and want AI that respects your workflow rather than replacing it. Skip if you need a polished GUI, zero configuration, or are allergic to managing API keys and token budgets.