gergap/vim-ollama

Vim plugin for integrating Ollama based LLM (large language models)

What it solves

This plugin provides Copilot-like AI code completion and interaction capabilities specifically for Vim users who want to avoid cloud-based services or NeoVim. It allows developers to run LLMs locally via Ollama to preserve privacy and maintain a terminal-based workflow.

How it works

The plugin uses Python scripts (complete.py and chat.py) that communicate with the Ollama REST API (or OpenAI/Mistral compatible endpoints) via I/O redirection. It integrates AI-generated suggestions directly into the Vim editor as "ghost text" and provides interfaces for chatting and editing code.

Who it’s for

Developers who use Vim (not NeoVim) and want AI-assisted coding—including tab completion, chat, and automated editing—using local LLMs or specific privacy-focused cloud providers.

Highlights

  • Local AI Backend: Primary support for Ollama, enabling local LLM execution for data privacy.
  • Multi-Provider Support: Compatible with OpenAI, LMStudio, Open WebUI, and Mistral AI.
  • Intelligent Completion: Offers tab-completion with options to accept suggestions by line or word.
  • Interactive Code Editing: Supports natural language code editing with an inline-diff view for reviewing changes.
  • Integrated Chat: Built-in chat support for code reviews and general interactions.
  • Easy Setup: Includes a setup wizard and automatic Python virtual environment management.

Related

  • Project
  • Project
  • Project
  • Project
  • Project