This plugin integrates the Claude Code CLI with Vim and MacVim.
- Run Claude Code inside a Vim terminal window
- Auto reload files changed by Claude
- Git project detection
- Configurable key mappings and commands
Plug 'keitheis/claude-code.vim'
Plugin 'keitheis/claude-code.vim'
Clone the repository into your ~/.vim
or ~/.vim/pack
directory.
let g:claude_code_config = {
\ 'window': {'position': 'botright'},
\ }
enter_insert
under the window
section controls whether the terminal
automatically enters insert mode whenever you switch to it. It defaults
to 1
. When enabled, the plugin feeds an i<BS>
sequence on focus so
the terminal always re-enters job mode.
:ClaudeCode
toggle the terminal:'<,'>ClaudeCodeSelect
send selected lines to Claude<C-,>
default mapping
Ensure Vim 8.0+ with +terminal
feature is available.
If you use the AutoComplPop plugin and see text like =feedPopup()
inserted when switching back to the Claude terminal, this plugin now
disables that mapping for the terminal buffer automatically.
Vim 8.0 or newer is required. Floating windows need Vim 8.2+