VimLM - LLM-powered Vim assistant
Project description
VimLM - Local LLM-Powered Coding Assistant for Vim
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
- Launch with default model (DeepSeek-R1-Distill-Qwen-7B-4bit):
vimlm your_file.js
-
From Normal Mode:
Ctrl-l: Send current line + file context- Example prompt: "Regex for removing html tags in item.content"
-
From Visual Mode:
- Select code →
Ctrl-l: Send selection + file context - Example prompt: "Convert this to async/await syntax"
- Select code →
-
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"
-
Follow-Up: After initial response:
Ctrl-r: Continue thread- Example follow-up: "In Manifest V3"
Advanced Configuration
Custom Model Setup
-
Browse models: MLX Community Models on Hugging Face
-
Edit config file:
{
"LLM_MODEL": "/path/to/your/mlx_model"
}
- Save to:
~/vimlm/cfg.json
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09f5366ce9d1251352596b4d8c293c5558acd8813e5787543aae04bf4f1399df
|
|
| MD5 |
b7ae79097a01302fde936c0c024d257a
|
|
| BLAKE2b-256 |
e74ba85f223727ae0230fe4c7293fe04dd0cc849234d37cfc88c865021951c1e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50db85376781f03b48d1d38aae167b2e5121eab63e2a31054f939341c7bef299
|
|
| MD5 |
6d809f945b658447c300c82e01f71cfd
|
|
| BLAKE2b-256 |
8d0caae5b748a6263e57709ff690aaf20981f3769707c742f2c8446bf9d6e08d
|