2025-02-14 18:34:00
github.com
LLM-powered coding companion for Vim, inspired by GitHub Copilot/Cursor. Integrates contextual code understanding, summarization, and AI assistance directly into your Vim workflow.
- Model Agnostic – Use any MLX-compatible model via a configuration file
- Vim-Native UX – Intuitive keybindings and split-window responses
- Deep Context – Understands code context from:
- Current file
- Visual selections
- Referenced files
- Project directory structure
- Conversational Coding – Iterative refinement with follow-up queries
- Air-Gapped Security – 100% offline – no APIs, no tracking, no data leaks
- Apple M-series chip
- Python 3.12.8
Ctrl-l
: Add current line + file to context
Example prompt:"Regex for removing HTML tags from item.content"
- Select code →
Ctrl-l
: Add selected block + current file to context
Example prompt:"Convert this to async/await syntax"
Ctrl-j
: Continue current thread
Example follow-up:"Use Manifest V3 instead"
Ctrl-p
: Insert code blocks from response into:- Last visual selection (Normal mode)
- Active selection (Visual mode)
Workflow Example:
- Select a block of code in Visual mode
- Prompt with
Ctrl-l
:"Convert this to async/await syntax"
- Press
Ctrl-p
to replace selection with generated code
!include [PATH] # Add files/folders to context
!include
(no path): Current folder!include ~/projects/utils.py
: Specific file!include ~/docs/api-specs/
: Entire folder
Example:"AJAX-ify this app !include ~/scrap/hypermedia-applications.summ.md"
!deploy [DEST_DIR] # Extract code blocks to directory
!deploy
(no path): Current directory!deploy ./src
: Specific directory
Example:"Create REST API endpoint !deploy ./api"
!continue [MAX_TOKENS] # Continue stopped response
!continue
: Default 2000 tokens!continue 3000
: Custom token limit
Example:"tl;dr !include large-file.txt !continue 5000"
!followup # Equivalent to Ctrl-j
Example:
Initial: "Create Chrome extension"
Follow-up: "Add dark mode support !followup"
Chain multiple commands in one prompt:
"Create HTMX component !include ~/lib/styles.css !deploy ./components !continue 4000"
Binding | Mode | Action |
---|---|---|
Ctrl-l |
Normal/Visual | Send current file + selection to LLM |
Ctrl-j |
Normal | Continue conversation |
Ctrl-p |
Normal/Visual | Replace the selection with generated code |
Esc |
Prompt | Cancel input |
VimLM uses a JSON config file with the following configurable parameters:
{
"DEBUG": true,
"LLM_MODEL": null,
"NUM_TOKEN": 2000,
"SEP_CMD": "!",
"USE_LEADER": false
}
- Browse models: MLX Community Models on Hugging Face
- Edit config file:
{
"LLM_MODEL": "mlx-community/DeepSeek-R1-Distill-Qwen-7B-4bit",
"NUM_TOKEN": 9999
}
- Save to:
~/vimlm/config.json
- Restart VimLM
If you prefer using
in place of
for the ViMLM key bindings:
VimLM is licensed under the Apache-2.0 license.
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.