whatisgithub

What is llama.vim?

ggml-org/llama.vim — explained in plain English

Analysis updated 2026-05-18

2,032Vim ScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Vim and Neovim plugin that adds local, offline AI code completion by connecting to a self-hosted llama.cpp model server.

Mindmap

mindmap
  root((llama.vim))
    What it does
      Local AI completion
      Inline suggestions
      Instruction editing
    Tech stack
      Vim Script
      llama.cpp
      Neovim
    Use cases
      Offline code completion
      Edit via instructions
      Tune to GPU memory
    Audience
      Vim developers
      Privacy-conscious coders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Get inline AI code completions in Vim without sending code to a cloud service.

USE CASE 2

Describe an edit in plain text and have the AI apply it to selected code.

USE CASE 3

Run a local coding assistant tuned to your GPU's available memory.

What is it built with?

Vim Scriptllama.cppNeovim

How does it compare?

ggml-org/llama.vimpangloss/vim-javascriptmbbill/undotree
Stars2,0323,7904,530
LanguageVim ScriptVim ScriptVim Script
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires installing and running a separate llama.cpp server locally, ideally with a GPU.

So what is it?

llama.vim is a plugin for the Vim and Neovim text editors that adds AI-assisted code and text completion, running entirely on your own computer without sending data to any external service. It works by connecting to a locally running AI model server called llama.cpp, which runs open-source language models on your own hardware. When you are typing in Vim, the plugin watches your cursor position and automatically suggests completions inline. You can accept a full suggestion by pressing Tab, or accept just the first line with Shift+Tab. There is also an instruction-based editing mode where you can describe a change in plain text and have the AI apply it to a selected block of code. The plugin is designed to work on consumer-grade hardware, not just high-end machines. It adjusts its behavior based on how much graphics memory your computer has, and the README provides specific recommended settings for machines with 8GB, 16GB, or 64GB of video memory. It also includes a technique for reusing context across files, which helps keep responses fast even in large projects. Installing it requires two steps: adding the plugin to Vim using a standard plugin manager like vim-plug or lazy.nvim, and separately installing and running the llama.cpp server, which is available through package managers on Mac and Windows or as a downloadable binary for other systems. The plugin is maintained by the ggml-org organization, the same group behind llama.cpp. A companion extension for VS Code is also available separately.

Copy-paste prompts

Prompt 1
Walk me through installing llama.vim with vim-plug and setting up a llama.cpp server.
Prompt 2
Which llama-server settings should I use for my GPU's VRAM according to this README?
Prompt 3
Explain how the Tab and Shift+Tab completion shortcuts work in llama.vim.
Prompt 4
How does llama.vim keep completions fast across a large codebase?

Frequently asked questions

What is llama.vim?

A Vim and Neovim plugin that adds local, offline AI code completion by connecting to a self-hosted llama.cpp model server.

What language is llama.vim written in?

Mainly Vim Script. The stack also includes Vim Script, llama.cpp, Neovim.

How hard is llama.vim to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is llama.vim for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.