summaryrefslogtreecommitdiff
path: root/docs/tmux.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-08 17:38:07 +0200
committerPaul Buetow <paul@buetow.org>2026-02-08 17:38:07 +0200
commitc5cd80b4bed1234152f19d23ddac51d86ba36f0f (patch)
treebfd0801e38a3e21321fedc094195a9ef5d4a4c27 /docs/tmux.md
parent944838bb0f753a0920ddb2f506758c410ed7ca43 (diff)
Fix Claude agent clearing to use readline instead of vim commands
Claude Code's prompt input field does not support vim commands for clearing. The previous sequence 'Escape gg C-v G d i' resulted in literal text 'gGdijo' appearing in the prompt instead of clearing it. Changed to 'C-a C-k' (Emacs/readline style): - C-a: Move cursor to start of line - C-k: Kill (delete) from cursor to end of line Also added 150ms delay after Escape key in sendClearSequence to ensure mode transitions complete before subsequent keys are sent (though Claude uses readline, this helps other potential vim-based agents). Changes: - internal/tmuxedit/claude_agent.go: clearKeys "C-a C-k" instead of vim - internal/tmuxedit/claude_agent_test.go: Update test expectations - internal/tmuxedit/agentutil.go: Add time import and Escape delay - docs/usage.md: Update claude clear method documentation - docs/tmux.md: Clarify claude uses readline not vim - config.toml.example: Update claude description Integration tested: - Extracted: "final verification test" - Sent: "FINAL REPLACED TEXT NO VIM COMMANDS" - Result: Clean replacement with NO vim command artifacts - All unit tests pass (67/67) - Coverage: 80.9% Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'docs/tmux.md')
-rw-r--r--docs/tmux.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tmux.md b/docs/tmux.md
index 1ece4c7..e7c99dd 100644
--- a/docs/tmux.md
+++ b/docs/tmux.md
@@ -92,9 +92,9 @@ Then press `prefix + e` in any pane running an AI agent. Hexai auto-detects the
See the [configuration guide](configuration.md) for customizing popup dimensions and agent patterns, or the [usage guide](usage.md) for the full workflow description.
**Input mode notes**: Each agent uses different clearing methods based on their input handling:
-- **Claude Code**: Uses Vi/Vim keybindings (`Escape gg C-v G d i`), so vim mode is recommended
-- **Cursor**: Uses simple backspace clearing (`End BSpace*200`), works in default mode
-- **Amp**: Uses Emacs/readline keybindings (`C-u`), works in TUI mode
+- **Claude Code**: Uses Emacs/readline keybindings (`C-a C-k`)
+- **Cursor**: Uses simple backspace clearing (`End BSpace*200`)
+- **Amp**: Uses Emacs/readline keybindings (`C-u`)
- **Aider**: Uses Emacs/readline keybindings (`C-u`)
The popup editor uses `$EDITOR` (or `$HEXAI_EDITOR`), so your normal vim/neovim setup is used for composing prompts.