claude.vim  by pasky

Vim plugin for AI pair programming with LLM integration

created 1 year ago
389 stars

Top 74.9% on sourcepulse

GitHubView on GitHub
Project Summary

This plugin integrates Anthropic's Claude LLM into Vim and Neovim for AI-assisted pair programming. It targets developers seeking a chat-centric, collaborative coding experience within their editor, offering direct code modification and contextual understanding of open buffers, unlike traditional code completion tools.

How It Works

The plugin provides two primary interaction modes: ClaudeImplement for targeted code modifications and ClaudeChat for general discussion and instruction. ClaudeImplement allows users to select code blocks and issue instructions, with Claude proposing changes via Vim's diff mode for review. ClaudeChat enables freeform conversation, with Claude having access to all open buffers. Claude can execute tools, including shell commands and Python expressions, and browse the web for information, all with user consent and review.

Quick Start & Requirements

  • Installation: Clone the repository into your Vim/Neovim plugin directory (e.g., ~/.vim/pack/pasky/start/claude.vim or ~/.config/nvim/pack/pasky/start/claude.vim).
  • Prerequisites:
    • Claude API key from Anthropic.
    • elinks or felinks for web access.
  • Configuration: Set g:claude_api_key in your .vimrc.
  • Usage: Refer to the README for keybindings and detailed usage instructions.

Highlighted Details

  • Deep integration with Vim's diff and folding features for code review.
  • Supports Claude's Tools interface for executing commands and scripts.
  • Can act as a full terminal replacement for interacting with Claude.
  • Capable of web searches and executing shell scripts for sysadmin tasks.

Maintenance & Community

  • Early alpha software with rapid, potentially non-backward-compatible evolution expected.
  • Maintainer is active on libera IRC (pasky) and Twitter/X (@xpasky).
  • Users are encouraged to engage via GitHub issues and PRs.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

This is early alpha software and is expected to evolve rapidly and potentially with breaking changes. The README notes that Claude Sonnet 3.5 may not be sufficient for completely autonomous complex tasks, requiring user oversight and feedback. Full chat history and buffer content are sent with each interaction, potentially consuming tokens rapidly and hitting daily limits.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
50 stars in the last 90 days

Explore Similar Projects

Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic) and Adam Wolff Adam Wolff(Claude Code Core; MTS at Anthropic).

claude-code-sdk-python by anthropics

3.8%
744
SDK for Claude Code interaction
created 1 month ago
updated 2 days ago
Feedback? Help us improve.