How to use Vim in Claude Code

Essay - Published: 2026.03.06 | 2 min read (526 words)
claude | create | vim

DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)

I've been using Claude Code daily in my agentic engineering workflows and have recently moved to a Linux-based, terminal-first computer setup to better manage my multiple agents across various projects. As part of this transition, I've also moved to a keyboard-first workflow which largely involves using vim bindings in my editors and to navigate my windows.

So naturally I wanted to see if I could do smth similar with Claude Code and it turns out you can use vim bindings in Claude! So here we'll discuss how to set that up.

How to use Vim bindings in Claude Code

Claude Code has a built-in /vim command that sets the input box to vim mode.

In this mode you can navigate and modify your input box via vim's normal and insert modes:

  • Insert mode - what you're used to w/o vim, just type things
  • Normal mode - Allows you to use h/j/k/l to move around and typical motions like b/w and actions like d/c/r

For full supported vim bindings, checkout the official vim editor mode docs.

What it does not do:

  • No visual mode (v) - at least none I could find or get working
  • Can't move through text outside of the input box - I use zellij's scrolling mechanisms to scroll with keyboard

How this is configured

Based on my research and experiments with this setting, the vim mode persists across sessions on the same computer but is not a config setting but rather a runtime setting. This makes it difficult to stow or symlink from a dotfile as the file itself is managed by Claude vs a config that's fully user-managed.

Details:

  • Setting lives in ~/.claude.json - This is actively managed by Claude Code for things like OAuth, caches, and project state making it unsuitable for dotfile symlinking.
  • Setting is: "editorMode": "vim"

You can test this yourself by opening the claude.json file and toggling /vim on and off.

Next Steps

If you're a vim person, try it out! I'll note that it does add some overhead to prompts without that much gain - prompts tend to be relatively short with little need to edit them and vim is often better when you need lots of edits. But I'm continuing my journey to keyboard native and think it's nice to have more of my editors / text inputs using the same keyboard commands to reduce cognitive load / switching (I am also using vim-like commands for navigating websites in Chrome with Vimium and updating how Sway / Zellij do window navigation to rely on similar keys).

If you're curious about my agentic engineering workflows, I have snapshots of my full .claude folders available in my HAMY LABS example repo on GitHub. This is available to all HAMINIONS Members.

If you liked this post you might also like:

Want more like this?

The best way to support my work is to like / comment / share this post on your favorite socials.

Built with CloudSeed Rust