# Ollama Support for Vim

A Vim plugin that adds Copilot-style AI code completion and chat, backed by a local Ollama model instead of a cloud service, plus a tool-based editing workflow that can apply changes and iterate on compiler diagnostics.

This plugin brings AI-based tab completion and an integrated chat for code review to Vim, using Ollama, with models such as Llama 3, Codellama or Deepseek-coder-v2, so code and prompts stay off the cloud, unlike Copilot.vim's dependence on Microsoft's commercial service. It was written for developers who prefer classic Vim over Neovim, which most competing AI plugins require.

Its newer OllamaEdit workflow can inspect a selected range or the whole project workspace, apply targeted changes, run validation tools and iterate on compiler diagnostics through :OllamaQuickFix, optionally searching the web and fetching pages; the project's own documentation warns that giving an AI control over project files carries security risks even with sandboxing enabled, and recommends running AI-driven builds through a bundled Secure Build Helper that runs inside bubblewrap with project files protected from writes. It also supports OpenAI-compatible endpoints such as LMStudio or Open WebUI, and Mistral AI.

Website: https://github.com/gergap/vim-ollama
