{"id":45662079,"url":"https://github.com/rishi-opensource/vim-claude-code","last_synced_at":"2026-04-01T18:38:17.242Z","repository":{"id":339318543,"uuid":"1161410181","full_name":"rishi-opensource/vim-claude-code","owner":"rishi-opensource","description":"Claude CLI integration for Vim, enabling AI-powered coding workflows.","archived":false,"fork":false,"pushed_at":"2026-03-19T16:03:22.000Z","size":8568,"stargazers_count":37,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-20T03:58:50.492Z","etag":null,"topics":["claude-ai","claude-cli","claude-code","developer-tools","integration","productivity","vim","vim-plugin","vim9-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishi-opensource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T04:26:19.000Z","updated_at":"2026-03-19T16:04:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rishi-opensource/vim-claude-code","commit_stats":null,"previous_names":["rishi-opensource/vim-claude-code"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rishi-opensource/vim-claude-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-opensource%2Fvim-claude-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-opensource%2Fvim-claude-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-opensource%2Fvim-claude-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-opensource%2Fvim-claude-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishi-opensource","download_url":"https://codeload.github.com/rishi-opensource/vim-claude-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-opensource%2Fvim-claude-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-ai","claude-cli","claude-code","developer-tools","integration","productivity","vim","vim-plugin","vim9-plugin"],"created_at":"2026-02-24T09:17:35.153Z","updated_at":"2026-04-01T18:38:17.229Z","avatar_url":"https://github.com/rishi-opensource.png","language":"Vim Script","readme":"# vim-claude-code\n\n[![CI](https://github.com/rishi-opensource/vim-claude-code/actions/workflows/ci.yml/badge.svg)](https://github.com/rishi-opensource/vim-claude-code/actions/workflows/ci.yml)\n[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)](CHANGELOG.md)\n\n**AI-powered coding, inside Vim. No context switching.**\n\n`vim-claude-code` brings [Claude Code](https://docs.anthropic.com/en/docs/claude-code) directly into your editor. Fix bugs, write tests, review diffs, generate commits, and refactor code — all without leaving Vim.\n\nOne keypress opens Claude in a split panel. Another hides it. Your session persists across toggles. Claude edits your files; your buffers reload automatically. You stay in flow.\n\n## Why vim-claude-code?\n\nMost AI coding tools pull you out of your editor — into a browser, a chat window, or a separate terminal. `vim-claude-code` keeps everything inside Vim:\n\n- **No copy-pasting** — commands automatically capture your visual selection or current function\n- **No tab switching** — Claude runs in a managed split, toggled with a single key\n- **No blind edits** — every file change Claude proposes shows up as a reviewable diff before anything is written to disk\n- **No workflow interruption** — buffers reload automatically when Claude modifies files\n\n## Demos\n\n![vim-claude-code highlight reel](assets/00-highlight-reel.gif)\n\n\u003e Toggle, fix bugs, generate tests, explain code, git workflows, diff preview, terminal zoom, and more — all from within Vim.\n\u003e See [DEMO.md](doc/DEMO.md) for individual feature walkthroughs.\n\n## Features at a Glance\n\n### Stay in Flow\n- **One-key toggle** — `\u003cC-\\\u003e` opens and hides Claude. Session persists across toggles.\n- **Terminal Zoom** — Maximize Claude to full-screen with `\u003cC-w\u003ez`, tmux-style. Restore your split instantly.\n- **Auto file refresh** — Buffers reload when Claude edits your files. No manual `:e` needed.\n- **Multiple layouts** — Right split (default), bottom, top, left, floating popup, or dedicated tab.\n\n### Context-Aware Commands\n- **Selection-aware** — Commands use your visual selection when active, otherwise detect the current function automatically.\n- **22 sub-commands** — Explain, fix, refactor, test, document, commit, review, rename, optimize, debug, and more. All tab-completable.\n- **Git-aware** — Claude starts at your repo root. Separate sessions per repository.\n\n### Review Before Claude Writes\n- **Diff preview** — Every file edit Claude proposes opens a side-by-side diff tab. Review what changes, then accept or reject. You stay in control.\n\n### Full Git Workflow\n- **Commit messages** — Generated from your staged diff, with conventional commit support.\n- **Code review** — Claude reviews your current diff with configurable strictness and security checks.\n- **PR descriptions** — Generated from your branch changes without leaving the editor.\n\n## Requirements\n\n- Vim 8+ compiled with `+terminal`\n- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed and in `$PATH`\n- Optional: `+popupwin` for floating window mode\n- Optional: `python3` for diff preview (`:Claude preview`)\n\n## Installation\n\n\u003e **Stable release — v1.4.0**\n\u003e Pin to the latest stable release using the examples below, or omit the tag to always track `main`.\n\n### [vim-plug](https://github.com/junegunn/vim-plug)\n```vim\n\" Always track latest\nPlug 'rishi-opensource/vim-claude-code'\n\n\" Pin to stable release\nPlug 'rishi-opensource/vim-claude-code', { 'tag': 'v1.4.0' }\n```\n\n### [Vundle](https://github.com/VundleVim/Vundle.vim)\n```vim\nPlugin 'rishi-opensource/vim-claude-code'\n```\n\u003e Vundle does not support tag pinning. To pin manually after install:\n\u003e ```sh\n\u003e cd ~/.vim/bundle/vim-claude-code \u0026\u0026 git checkout v1.4.0\n\u003e ```\n\n### [pathogen](https://github.com/tpope/vim-pathogen)\n```sh\ngit clone --branch v1.4.0 https://github.com/rishi-opensource/vim-claude-code.git ~/.vim/bundle/vim-claude-code\n```\n\n### Native packages (Vim 8+)\n```sh\nmkdir -p ~/.vim/pack/plugins/start\ngit clone --branch v1.4.0 https://github.com/rishi-opensource/vim-claude-code.git ~/.vim/pack/plugins/start/vim-claude-code\n```\n\n## Quick Start\n\n**1. Open Claude:**\n```vim\n:Claude\n\" or press \u003cC-\\\u003e\n```\n\n**2. Run a health check:**\n```vim\n:Claude doctor\n```\nThis reports `[OK]` / `[FAIL]` for every dependency and tells you exactly what to fix.\n\n**3. Explore commands with tab completion:**\n```vim\n:Claude \u003cTab\u003e\n```\n\nThe Claude session persists — toggling with `\u003cC-\\\u003e` hides and restores the same session.\n\n## Commands\n\n### Terminal\n\n*Open, hide, and manage the Claude terminal session.*\n\n| Command | Description |\n|---|---|\n| `:Claude` | Toggle the Claude Code terminal |\n| `:Claude continue` | Toggle with `--continue` (resume last conversation) |\n| `:Claude resume` | Toggle with `--resume` (interactive conversation picker) |\n| `:Claude verbose` | Toggle with `--verbose` (detailed logging) |\n\n### Code Intelligence\n\n*Commands work on your visual selection when active, or auto-detect the current function.*\n\n| Command | Flags | Description |\n|---|---|---|\n| `:Claude explain` | `--brief`, `--detailed` | Explain selected code or current function |\n| `:Claude fix` | `--apply`, `--safe` | Fix bugs and correctness issues |\n| `:Claude refactor` | `--extract`, `--simplify`, `--optimize`, `--rename` | Refactor code |\n| `:Claude test` | `--framework {name}`, `--edge-cases` | Generate unit tests |\n| `:Claude doc` | `--inline`, `--markdown` | Generate documentation |\n\n### Git Workflow\n\n*From staged diff to commit message to PR description — without opening a browser.*\n\n| Command | Flags | Description |\n|---|---|---|\n| `:Claude commit` | `--conventional`, `--amend` | Generate commit message from staged diff |\n| `:Claude review` | `--strict`, `--security` | Code review on current diff |\n| `:Claude pr` | | Generate PR description |\n\n### Architecture \u0026 Planning\n\n*Think through larger problems with Claude before writing code.*\n\n| Command | Description |\n|---|---|\n| `:Claude plan` | Generate an implementation plan for the current file |\n| `:Claude analyze` | Analyze for complexity, performance, and security issues |\n\n### Workflow Utilities\n\n*Direct in-editor actions — apply suggestions, debug errors, rename symbols, or zoom the terminal.*\n\n| Command | Description |\n|---|---|\n| `:Claude rename` | Suggest better variable/function names |\n| `:Claude optimize` | Optimize code for performance |\n| `:Claude debug` | Analyze the error on the current line |\n| `:Claude apply` | Apply Claude's last suggestion to the file (prompts for confirmation) |\n| `:Claude zoom` | Toggle full-screen (zoom) mode for the Claude terminal |\n\n### Meta\n\n| Command | Description |\n|---|---|\n| `:Claude chat` | Send a free-form message with current file context |\n| `:Claude context` | Preview what context will be sent to Claude |\n| `:Claude model [name]` | Switch model (`sonnet`, `opus`, `haiku`) |\n\n### Utility\n\n| Command | Description |\n|---|---|\n| `:Claude version` | Show plugin version, Vim version, Claude CLI version, and terminal support |\n| `:Claude doctor` | Health check: verifies Claude CLI, Git, terminal support, and Vim version |\n\n## Reviewing Claude's Edits — Diff Preview\n\n![diff preview demo](assets/16-diff-preview.gif)\n\nWhen Claude proposes changes to a file, a **side-by-side diff tab opens automatically** before anything is written to disk:\n\n```\n  [current file]    │    [proposed changes]\n```\n\nReview exactly what Claude wants to change, then use these keys in the diff tab:\n\n| Key | Action |\n|---|---|\n| `ga` | Accept — send `y` to Claude, apply the change |\n| `gr` | Reject — send `n` to Claude, discard the change |\n| `q` | Close the diff tab without responding |\n\n**Enable diff preview for your project:**\n```vim\n:Claude preview install\n```\n\nThis registers Claude Code hooks in `.claude/settings.local.json`. To auto-enable on every Vim startup:\n```vim\nlet g:claude_code_diff_preview = 1\n```\n\n**Diff preview commands:**\n\n| Command | Description |\n|---|---|\n| `:Claude preview install` | Register diff preview hooks in `.claude/settings.local.json` |\n| `:Claude preview uninstall` | Remove diff preview hooks |\n| `:Claude preview close` | Manually close an open diff tab |\n| `:Claude preview status` | Show diff preview status and dependency checks |\n\nRequires `python3`. Uses Vim `+clientserver` for instant diffs when available, falls back to polling.\n\n## Full-Screen Focus — Terminal Zoom\n\n![zoom demo](assets/17-terminal-zoom.gif)\n\nWorking through a complex problem? Press `\u003cC-w\u003ez` inside the Claude terminal to **maximize it full-screen** — just like tmux's zoom. Press again to restore your split layout.\n\nThis is especially useful when Claude is generating a long response and you want to read it without distractions.\n\n```vim\n\" Customize the zoom key\nlet g:claude_code_map_zoom = '\u003cC-w\u003ez'\n```\n\n## Keymaps\n\n### Default keymaps\n\n| Mode | Key | Action |\n|---|---|---|\n| Normal | `\u003cC-\\\u003e` | Toggle Claude Code terminal |\n| Normal | `\u003cLeader\u003ecC` | Toggle with `--continue` |\n| Normal | `\u003cLeader\u003ecV` | Toggle with `--verbose` |\n| Terminal | `\u003cC-\\\u003e` | Hide Claude Code terminal |\n| Terminal | `\u003cC-w\u003ez` | **Zoom Toggle**: Maximize or restore terminal |\n| Terminal | `\u003cC-h/j/k/l\u003e` | Navigate to adjacent window |\n\n### Extended keymaps (`g:claude_code_map_extended_prefix` + key)\n\n| Key | Command | Key | Command |\n|---|---|---|---|\n| `\u003cLeader\u003ece` | explain | `\u003cLeader\u003ecG` | commit |\n| `\u003cLeader\u003ecf` | fix | `\u003cLeader\u003ecR` | review |\n| `\u003cLeader\u003ecr` | refactor | `\u003cLeader\u003ecp` | pr |\n| `\u003cLeader\u003ect` | test | `\u003cLeader\u003ecP` | plan |\n| `\u003cLeader\u003ecd` | doc | `\u003cLeader\u003eca` | analyze |\n| `\u003cLeader\u003ecn` | rename | `\u003cLeader\u003ecD` | debug |\n| `\u003cLeader\u003eco` | optimize | `\u003cLeader\u003ecA` | apply |\n| `\u003cLeader\u003ecc` | chat | `\u003cLeader\u003ecx` | context |\n| `\u003cLeader\u003ecm` | model | | |\n\nVisual mode: `\u003cLeader\u003ec` + `e/f/r/t/d/n/o` operate on the selection.\n\nTo disable all default keymaps:\n```vim\nlet g:claude_code_map_keys = 0\nlet g:claude_code_map_extended_keys = 0\n```\n\n## Window Layouts\n\nSet `g:claude_code_position` to match your preferred workflow:\n\n| Value | Layout |\n|---|---|\n| `'right'` | Vertical split on the right (default) |\n| `'bottom'` | Horizontal split at the bottom |\n| `'top'` | Horizontal split at the top |\n| `'left'` | Vertical split on the left |\n| `'float'` | Floating popup (requires `+popupwin`) |\n| `'tab'` | Dedicated tab page |\n\n```vim\n\" Bottom split at 30%\nlet g:claude_code_position   = 'bottom'\nlet g:claude_code_split_ratio = 0.3\n\n\" Floating popup\nlet g:claude_code_position    = 'float'\nlet g:claude_code_float_width  = 0.85\nlet g:claude_code_float_height = 0.85\nlet g:claude_code_float_border = 'double'\n```\n\n## Configuration\n\n| Variable | Default | Description |\n|---|---|---|\n| `g:claude_code_command` | `'claude'` | CLI executable |\n| `g:claude_code_position` | `'right'` | Window layout |\n| `g:claude_code_split_ratio` | `0.4` | Terminal size (0.0–1.0) |\n| `g:claude_code_enter_insert` | `1` | Auto-enter Terminal mode on focus |\n| `g:claude_code_hide_numbers` | `1` | Hide line numbers in terminal |\n| `g:claude_code_hide_signcolumn` | `1` | Hide sign column in terminal |\n| `g:claude_code_use_git_root` | `1` | Start Claude at git root |\n| `g:claude_code_multi_instance` | `1` | Separate session per git repo |\n| `g:claude_code_map_keys` | `1` | Register default toggle keymaps |\n| `g:claude_code_map_extended_keys` | `1` | Register `\u003cLeader\u003ec*` keymaps |\n| `g:claude_code_map_toggle` | `'\u003cC-\\\u003e'` | Toggle key |\n| `g:claude_code_map_zoom` | `'\u003cC-w\u003ez'` | Zoom key |\n| `g:claude_code_map_continue` | `'\u003cLeader\u003ecC'` | Continue key |\n| `g:claude_code_map_verbose` | `'\u003cLeader\u003ecV'` | Verbose key |\n| `g:claude_code_map_extended_prefix` | `'\u003cLeader\u003ec'` | Prefix for all extended keymaps |\n| `g:claude_code_refresh_enable` | `1` | Auto-reload changed buffers |\n| `g:claude_code_refresh_interval` | `1000` | Polling interval (ms) |\n| `g:claude_code_refresh_notify` | `1` | Notify on buffer reload |\n| `g:claude_code_float_width` | `0.8` | Popup width fraction |\n| `g:claude_code_float_height` | `0.8` | Popup height fraction |\n| `g:claude_code_float_border` | `'rounded'` | Border style |\n| `g:claude_code_model` | `''` | Claude model override |\n| `g:claude_code_debug` | `0` | Enable debug logging to message area |\n| `g:claude_code_diff_preview` | `0` | Auto-start diff preview polling on Vim startup |\n| `g:claude_code_terminal_start_delay` | `300` | Delay (ms) before attaching to Claude terminal |\n\nBuffer-local `b:claude_code_*` overrides take precedence over `g:` variables.\n\n## Troubleshooting\n\n**Run the health check first:**\n```vim\n:Claude doctor\n```\nThis reports `[OK]` / `[FAIL]` for each dependency and tells you exactly what to fix.\n\n---\n\n**E117: Unknown function** — Run `:helptags ALL` then restart Vim. Ensure the plugin directory is on your `runtimepath`.\n\n**Terminal does not open** — Verify `vim --version | grep +terminal`. The plugin requires Vim compiled with `+terminal`.\n\n**Claude not found** — Ensure `claude` is in `$PATH`: `which claude`.\n\n**File changes not detected** — Check `g:claude_code_refresh_enable` is `1` and that `autoread` is not globally disabled in your vimrc.\n\n**Debug logging** — Enable verbose output to diagnose issues:\n```vim\nlet g:claude_code_debug = 1\n```\nAll internal events (dispatch, terminal launch, git calls, refresh) will be printed to the message area.\n\nFor full in-editor documentation, run `:help claude-code`.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for full details. This project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated versioning. See [doc/RELEASING.md](doc/RELEASING.md) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishi-opensource%2Fvim-claude-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishi-opensource%2Fvim-claude-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishi-opensource%2Fvim-claude-code/lists"}