Skip to main content

VimLM - LLM-powered Vim assistant

Project description

VimLM - Local LLM-Powered Coding Assistant for Vim

vimlm

An LLM-powered coding companion for Vim, inspired by GitHub Copilot/Cursor. Integrates contextual code understanding, summarization, and AI assistance directly into your Vim workflow.

Features

  • Model Agnostic - Use any MLX-compatible model via config file
  • Vim-Native UX - Ctrl-l/Ctrl-r keybindings and split-window responses
  • Deep Context - Understands code context from:
    • Current file
    • Visual selections
    • Referenced files (!@#$ syntax)
    • Project directory structure
  • Conversational Coding - Iterative refinement with follow-up queries
  • Air-Gapped Security - 100% offline - no APIs, no tracking, no data leaks

Requirements

  • Apple M-series chip (M1/M2/M3/M4)
  • Python 3.12.8

Installation

pip install vimlm

Quick Start

  1. Launch with default model (DeepSeek-R1-Distill-Qwen-7B-4bit):
vimlm your_file.js
  1. From Normal Mode:

    • Ctrl-l: Send current line + file context
    • Example prompt: "Regex for removing html tags in item.content"
  2. From Visual Mode:

    • Select code → Ctrl-l: Send selection + file context
    • Example prompt: "Convert this to async/await syntax"
  3. Add Context: Use !@#$ to include additional files/folders:

    • !@#$ (no path): Current folder
    • !@#$ ~/scrap/jph00/hypermedia-applications.summ.md: Specific folder
    • !@#$ ~/wtm/utils.py: Specific file
    • Example prompt: "AJAX-ify this app !@#$ ~/scrap/jph00/hypermedia-applications.summ.md"
  4. Follow-Up: After initial response:

    • Ctrl-r: Continue thread
    • Example follow-up: "In Manifest V3"

Advanced Configuration

Custom Model Setup

  1. Browse models: MLX Community Models on Hugging Face

  2. Edit config file:

{
 "LLM_MODEL": "/path/to/your/mlx_model"
}
  1. Save to:
~/vimlm/cfg.json
  1. Restart VimLM

Key Bindings

Binding Mode Action
Ctrl-l Normal/Visual Send current file + selection to LLM
Ctrl-r Normal Continue conversation
Esc Prompt Cancel input

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vimlm-0.0.5.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vimlm-0.0.5-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file vimlm-0.0.5.tar.gz.

File metadata

  • Download URL: vimlm-0.0.5.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for vimlm-0.0.5.tar.gz
Algorithm Hash digest
SHA256 09f5366ce9d1251352596b4d8c293c5558acd8813e5787543aae04bf4f1399df
MD5 b7ae79097a01302fde936c0c024d257a
BLAKE2b-256 e74ba85f223727ae0230fe4c7293fe04dd0cc849234d37cfc88c865021951c1e

See more details on using hashes here.

File details

Details for the file vimlm-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: vimlm-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for vimlm-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 50db85376781f03b48d1d38aae167b2e5121eab63e2a31054f939341c7bef299
MD5 6d809f945b658447c300c82e01f71cfd
BLAKE2b-256 8d0caae5b748a6263e57709ff690aaf20981f3769707c742f2c8446bf9d6e08d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page