sponsor Vim development Vim logo Vim Book Ad

ollama-fim.vim : A Vim plugin for inline FIM code completions powered by Ollama models.

 script karma  Rating 0/1, Downloaded by 259  Comments, bugs, improvements  Vim wiki

created by
Mauricio Andrade
 
script type
utility
 
description
ollama-fim.vim

A Vim plugin for inline FIM (fill-in-the-middle) code completions powered by Ollama models. It is heavily inspired by the UX of copilot.vim — ghost text suggestions appear as you type and can be accepted with Tab — but it uses your own Ollama instance and the same FIM prompt engineering from the ollama-fim VS Code extension https://marketplace.visualstudio.com/items?itemName=guzmandrade-dev.ollama-fim.
 
install details
Using Vim's built-in packages

mkdir -p ~/.vim/pack/plugins/start
cd ~/.vim/pack/plugins/start
git clone https://github.com/guzmandrade-dev/ollama-fim.vim.git

Using vim-plug

Plug 'guzmandrade-dev/ollama-fim.vim', { 'rtp': 'vim' }
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ollama-fim.vim-1.0.7.zip 1.0.7 2026-08-03 9.0 Mauricio Andrade perf: cache context and config lookups
refactor(complete): improve completion trimming with structural balance
feat(complete): add logical truncation for FIM completions
feat: Add optional ctags-based symbol context
docs: update README to include OpenAI API compatibility
docs: update rnj-1 example model in README.md
docs: update together.ai example in README
docs: fix mistral fim token representation in README
docs: update FIM format examples in README.md
docs: fix escaping of pipe characters in README table
Add screenshot and asset link to README
ollama-fim.vim-1.0.6.zip 1.0.6 2026-07-02 9.0 Mauricio Andrade feat: add support for OpenAI-compatible backends
refactor: tune default settings and refine raw mode logic
feat(prompt): enable raw mode
refactor: reduce default context window sizes
fix: handle empty API responses and add stop tokens
feat(client): support native FIM templates for openai backend
refactor(openai): use text completions instead of chat completions
feat(openai): switch to chat completions API
fix(core): use default stop tokens for openai backend
ollama-fim.vim-1.0.5.zip 1.0.5 2026-06-26 9.0 Mauricio Andrade feat: add indentation normalization for completions
feat: add native Mistral and Ministral FIM support
Revise version numbers in CHANGELOG.md
feat: update UI to popup-only and add logging
ollama-fim.vim.zip 1.0.1 2026-06-22 9.0 Mauricio Andrade prefer popup_atcursor for ghost text

- Prioritize using `popup_atcursor` for rendering suggestions
- Move `textprop` to a fallback mechanism
- Remove redundant fallback function logic
ip used for rating: 216.73.216.72

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github