-
Notifications
You must be signed in to change notification settings - Fork 62
Community extension: claude-code-extras — same-window display, copy/paste, input buffer & instance manager #128
Description
Hi! I've been using claude-code.el daily and built some enhancements on top of it. Sharing in case others find them useful or any of these could be upstreamed.
What it adds
1. Same-window display
Claude buffers always open in the current window instead of creating extra splits. Includes advice on pop-to-buffer and delete-window to prevent vterm from rearranging windows during initialization.
2. Copy/Paste support (vterm backend)
- M-w: Enter copy-mode, or copy selected region and exit
- C-y: Paste from kill-ring into the Claude terminal input
Uses a two-layer interception approach:
- Normal mode:
:before-untiladvice onvterm--self-insert/vterm--self-insert-meta - Copy mode:
minor-mode-overriding-map-alistto override user bindings
3. Dedicated input buffer
A separate Emacs buffer for composing multi-line input with full editing and completion support:
- C-c c i — Open input buffer (displayed below Claude window)
- C-RET — Send content to Claude
- C-up / C-down — Browse send history
- RET — Insert newline
Each Claude instance gets its own input buffer with buffer-local history. Auto-opens on Claude startup.
4. Instance manager dashboard (claude-code-manager.el)
A tabulated-list-mode based panel for managing multiple Claude instances:
- View all running instances with activity preview (last terminal line)
- Create / kill / switch between instances
- Batch mark-and-delete (dired-style
d/u/x) - Auto-refresh every 2 seconds
- Bound to C-c c L
5. Spinner character fix
Replaces Unicode spinner glyphs (U+2722, U+273B, U+273D) with * via buffer-display-table to avoid font fallback line-height issues (e.g. with Sarasa Fixed SC).
Repo
https://github.com/lsy83971/claude-code-emacs
Would love to hear if any of these features would be welcome as upstream PRs. Happy to adapt the code to fit the project's conventions.
Thanks for building claude-code.el!