← Back to Leaderboard
Lggml-org

ggml-org/llama.vim

Vim plugin for local code completion and instruction edits via llama.cpp

View on GitHub ↗
Engineering Health (Methodology)
A · 87/100
Maintenance Activity
● Updated 3d ago
Latest Release
v0.1.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption15/25
Release Cadence17/20
License Clarity20/20
Local AIAPI
Total Stars
★ 2,210
24h Growth
+0
7d Growth
+5
Forks
133

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

ggml-org/llama.vim Star History (2024-10-27 - 2026-12-03) ALL-TIME STAR HISTORY (2024-10 – 2026-12) +2.2k in 767d · avg +3/day 2.3k 1.2k 0 2024-10-27: ★ 12024-12-14: ★ 1032025-02-01: ★ 1,0442025-03-22: ★ 1,2502025-05-10: ★ 1,3612025-06-28: ★ 1,4212025-08-16: ★ 1,5022025-10-04: ★ 1,5942025-11-22: ★ 1,6742026-01-10: ★ 1,7712026-02-28: ★ 1,8642026-04-18: ★ 1,9302026-06-06: ★ 2,0242026-07-25: ★ 2,1022026-09-12: ★ 2,1652026-10-31: ★ 2,1942026-12-03: ★ 2,210 ★ 2.2k 2024-10 2025-11 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

llama.vim is a Vim Script client for classic Vim and Neovim; model inference runs in a separate llama.cpp server. In Insert mode, cursor movement can trigger fill-in-the-middle (FIM) completion. The plugin gathers context around the cursor, supplements it with a ring of chunks from open or edited files and yanked text, and presents the generated text as an inline suggestion that the user can accept in whole or in part.

The repository separates plugin/, autoload/, and doc/; autoload/llama.vim contains the endpoint settings. g:llama_config exposes separate endpoints for FIM and instruction-driven edits, while named server profiles provide a single switch for both request paths. The integration is an editor client talking to a llama.cpp API over HTTP, not an MCP server or an inference runtime embedded in Vim.

Key Capabilities & Differentiators

The completion workflow fits edits inside existing text rather than just appending at the cursor. Tab accepts the full suggestion, Shift+Tab takes the first line, and configurable mappings support manual triggering and word acceptance. You can disable automatic FIM, adjust the scope around the cursor, and set a maximum generation time. Instruction editing has its own trigger and mappings to rerun, continue, accept, or cancel the edit.

FIM needs a compatible model. The supplied llama-server presets cover Qwen FIM sizes from 1.5B to 30B, and the examples include Qwen2.5-Coder 1.5B Q80 and 7B Q80. In one M1 Pro run, a request used 15,186 context tokens out of 32,768, computed 260 new prompt tokens, and generated 24 tokens in 1,245 ms. The example shows why context reuse and inline counters are useful: a large active context need not be recomputed for every request, but that does not make end-to-end completion instantaneous.

Trade-offs & Limitations

Compared with a hosted copilot, llama.vim gives the operator control over where inference runs, which compatible model it uses, and how much context the editor supplies. In return, you manage the server and model and tune for interactive latency. The generation limit is one control, not a guarantee of end-to-end responsiveness: model size, quantization, context reuse, and the location of the inference host all matter. For VS Code, the same organization offers the separate llama.vscode integration.

The context ring can make cross-file completions more relevant, but it also widens the data sent beyond the active buffer. When using a LAN or remote endpoint, check whether open-file fragments and yanked text are allowed to cross that boundary. Tab mappings may also need adjustment if another completion plugin uses them. MIT covers the editor plugin; review the server and model terms separately for commercial deployment.

Hardware & Deployment Guide

Install the plugin through vim-plug or Vundle, or use lazy.nvim for Neovim. Run llama.cpp separately: Homebrew and winget are installation options on macOS and Windows, respectively; prebuilt binaries or a source build are other paths. Start llama-server with a FIM preset such as --fim-qwen-1.5b-default or --fim-qwen-7b-default, point the plugin at the appropriate endpoints, and use :help llama for editor-side configuration.

The deployment choice is where inference runs: on the editing machine or on a reachable host, as illustrated by the named LAN profiles. Local completion does not require a cloud inference service once the server and model are available locally. The VRAM-based preset recommendations are useful starting points, but test the chosen model and context on the actual host. v0.1.0 is the first tagged release shown, with no previous release tag listed for comparison.

Inference boundary: The Vim Script plugin sends requests to a separate llama.cpp server, with distinct settings for FIM and instruction editing.
Context assembly: A configurable window around the cursor is supplemented by a ring of chunks from open or edited files and yanked text.
Suggestion controls: Tab accepts the full suggestion, Shift+Tab accepts the first line, and configurable mappings support manual triggering and word acceptance.
Instruction editing: The default <leader>lli mapping starts an instruction-driven edit, with separate controls to rerun, continue, accept, or cancel.
Server switching: Named profiles let :LlamaProfile redirect both editing modes to another llama.cpp server.
Performance visibility: Inline statistics expose context usage, ring activity, prompt computation, generated tokens, and request latency.
Best For

Vim and Neovim users who want inline FIM completion and instruction edits, and can run llama.cpp locally or on a trusted LAN host.

Skip If

You need a managed service with no inference operations, an MCP integration, or a native extension for a different editor.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIAPI
brew install llama.cpp

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ggml-org/llama.vim.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ggml-org/llama.vim Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about llama.vim

How does the editor connect to the model, and can I switch servers without restarting?

Install the editor plugin and run a separate llama.cpp server. Set g:llama_config.endpoint_fim for completion and/or g:llama_config.endpoint_inst for instruction editing. FIM requires a compatible model. If you define named server profiles, :LlamaProfile <name> switches both request types to the selected server.

How much VRAM do I need, and where does the runtime overhead sit?

Size the inference host separately from Vim. The supplied presets range from 1.5B to 30B and are grouped by VRAM, but those bands are starting points, not minimum requirements. Measure latency and memory with the model, quantization, and context you plan to use. The M1 Pro example shows that context reuse can limit prompt recomputation without guaranteeing subsecond completion.

Can a company self-host this plugin for proprietary code?

The plugin is MIT-licensed and can be used commercially subject to the license terms. Review llama.cpp and the selected model weights separately, and check your organization's data handling rules. If the endpoint is on another machine, completion context can include open or edited file chunks and yanked text, so treat that server as a recipient of source data.

How does it compare with a hosted copilot or the ggml-org VS Code extension?

Choose llama.vim when Vim or Neovim is your main editor and you want control over model placement and completion context. A hosted copilot is a better fit if you want inference operated for you. For VS Code, the corresponding repository is ggml-org/llama.vscode; llama.vim is not the VS Code integration.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ggml-org/llama.vim? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ggml-org/llama.vim on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare