Skip to content

Experiment: nvim tool — vim motions as edit interface via tmux #492

Description

@bonk-moltbot

Concept

Replace read_file, edit_file, and write_file with a single nvim tool. The model sends vim keystrokes, nvim executes them in a tmux pane, capture-pane returns what the screen shows. One tool, three capabilities.

Token savings: :%s/old/new/g = 15 tokens. Equivalent edit_file with oldText/newText context = 180+ tokens. 12x reduction on renames, 50x on method deletions.

tmux IS the truncation — capture-pane returns exactly one screen. No truncation logic needed. The model scrolls to what it needs with vim motions.

Prior art: Nobody has tried this. All existing approaches (Aider, Claude Code, pi-mono) use text-generation paradigms (search/replace, udiff, whole-file). This is the opposite: generate commands, not text.

Same architecture as ShellSession (#468): tmux pane + send-keys + capture-pane. Different program.

Full exploration: thoughts/shared/notes/2026-05-02/nvim-tool-vim-motions-as-edit-interface.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaBrainstorm idea — not yet planned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions