Terminal-Native AI Coding: Neovim with Claude Code

Table of content

You don’t need Cursor or VS Code to use AI coding tools. Claude Code runs in your terminal. Your editor stays wherever you want it.

Daniel Miessler figured this out in July 2025 when he published his three-pane Ghostty setup. The solution is dead simple: Claude Code on the left, Neovim on the right, terminal at the bottom. No plugins. No integrations. Just three panes and vim navigation.

The Setup

One terminal window. Three panes. Standard vim movement keys to jump between them.

+------------------+------------------+
|                  |                  |
|   Claude Code    |     Neovim       |
|                  |                  |
+------------------+------------------+
|              Terminal               |
+-------------------------------------+

Claude Code watches your files. Neovim edits them. The bottom pane runs tests, builds, and git commands.

Ghostty Configuration

Add these keybindings to your Ghostty config:

keybind = ctrl+h=goto_split:left
keybind = ctrl+j=goto_split:bottom
keybind = ctrl+k=goto_split:top
keybind = ctrl+l=goto_split:right

Now Ctrl+h/j/k/l moves between panes. Same muscle memory as vim splits.

tmux Alternative

If you use tmux instead of Ghostty:

# ~/.tmux.conf
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R

Create a session script:

#!/bin/bash
tmux new-session -d -s dev
tmux split-window -h
tmux split-window -v -t 0
tmux select-pane -t 1
tmux send-keys -t 0 "claude" Enter
tmux send-keys -t 1 "nvim ." Enter
tmux attach-session -t dev

The Workflow

Claude Code reads files. You edit in Neovim. Changes sync instantly because they share the filesystem.

You (in Neovim):     Edit src/auth.py
Claude Code:         "I see you changed the login function.
                      Want me to update the tests?"
You:                 "Yes"
Claude Code:         [writes test file]
You (in terminal):   pytest tests/test_auth.py

Practical Example

Ask Claude to implement a feature:

> Add rate limiting to the API endpoints in src/api/

Claude writes the code. Switch to Neovim (Ctrl+l) and review:

:e src/api/rate_limit.py

Make adjustments. Switch back to Claude (Ctrl+h):

> The rate limiter looks good. Now add tests for it.

Run tests in the bottom pane (Ctrl+j):

pytest -v tests/

Why This Works

Claude Code and Neovim don’t know about each other. They don’t need to. Both work with files. The terminal multiplexer handles the layout.

ComponentRole
Claude CodeReads codebase, writes files, answers questions
NeovimPrecise editing, vim keybindings, LSP
Terminal paneCommands, tests, git

Your Neovim config stays untouched. AI assistance shows up when you want it.

vs Plugin-Based Integration

Neovim AI plugins exist. Most are glitchy or require custom configurations that fight with your existing setup. The three-pane approach has zero config in Neovim itself.

ApproachProsCons
Three-paneNo plugins, no config, works todayRequires terminal switching
AI pluginsIn-editor experienceConfig complexity, plugin conflicts

Claude Code Pipe Mode

Miessler’s later setup added Claude’s pipe mode directly into Neovim. The claude -p command accepts piped input:

cat src/auth.py | claude -p "explain this code"

This enables keybindings that send selected text to Claude without leaving Neovim:

" Send visual selection to Claude for explanation
vnoremap <leader>ce :!claude -p "explain this code"<CR>

" Send current file to Claude for review
nnoremap <leader>cr :!claude -p "review this file" < %<CR>

Terminal-First Philosophy

Paul Gauthier’s Aider works the same way: terminal-first, no IDE required. Aider runs in your terminal alongside any editor. AI as a parallel process, not an embedded plugin.

Both tools treat the terminal as the integration layer. Your editor stays your editor. The AI tool runs separately. They communicate through the filesystem.

Comparison with IDE-Based Tools

AspectTerminal-NativeIDE-Based (Cursor/Copilot)
Editor choiceAny (Neovim, Emacs, Helix)VS Code or specific IDE
ConfigurationTerminal multiplexer onlyPlugin configuration
KeybindingsYour existing bindingsMay conflict with AI features
Resource usageLighterIDE overhead
Offline editingWorks (AI features don’t)Usually works

IDE tools give you tighter integration: inline suggestions, diff views, hover actions. Terminal tools give you flexibility: any editor, existing config, lighter resource usage.

Getting Started

  1. Install Claude Code:
npm install -g @anthropic-ai/claude-code
claude login
  1. Set up your terminal multiplexer (Ghostty, tmux, or kitty)

  2. Add the keybindings for pane navigation

  3. Open three panes: Claude Code left, Neovim right, terminal bottom

  4. Start coding

If you decide you don’t like it, nothing changes in your Neovim config. Close the panes and you’re back to normal.

Works well with parallel sessions (multiple Claude instances in different worktrees), git worktrees for isolating experiments, and Plan Mode to have Claude plan before implementing.


Next: Paul Gauthier’s Terminal-First AI Coding

Topics: ai-coding claude-code workflow