diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-18 16:49:36 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-18 16:49:36 -0400 |
| commit | 01a1aea2afe5a7a63ca55d13a1552050ca3a772b (patch) | |
| tree | 5adcba7a767f3fa97b02106abb5835084b317305 | |
| parent | 7cd739234e9c83be9c82200a918281780f38fc9a (diff) | |
| download | archsetup-01a1aea2afe5a7a63ca55d13a1552050ca3a772b.tar.gz archsetup-01a1aea2afe5a7a63ca55d13a1552050ca3a772b.zip | |
feat(tmux): mirror vterm-copy-mode key story in tmux copy-mode
M-w copies and stays in mode so multiple selections can be grabbed in a row
(was copy-selection-and-cancel). C-g exits (was clear-selection). Enter is
unbound so RET has no copy-and-exit shortcut. q and Escape already cancel
by default and are kept as-is.
Mirrors the cj/vterm-tmux-history and vterm-copy-mode story on the Emacs
side, so all three surfaces for lifting text out of a vterm share one key
story.
| -rw-r--r-- | dotfiles/common/.tmux.conf | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dotfiles/common/.tmux.conf b/dotfiles/common/.tmux.conf index 93a3238..071be99 100644 --- a/dotfiles/common/.tmux.conf +++ b/dotfiles/common/.tmux.conf @@ -77,8 +77,16 @@ set-option -g history-limit 100000 # don't allow suspending client unbind-key C-z -# emacs key bindings in tmux command prompt (prefix + :) -set -g status-keys emacs +# emacs key bindings in tmux command prompt (prefix + :) +set -g status-keys emacs + +# copy-mode keys mirror the Emacs cj/vterm-tmux-history story +# (~/.emacs.d/modules/vterm-config.el): M-w copies and stays in mode +# for repeated copying; q / Escape / C-g exit without copying; +# Enter is unbound so RET has no "copy and exit" shortcut. +bind-key -T copy-mode M-w send-keys -X copy-selection +bind-key -T copy-mode C-g send-keys -X cancel +unbind-key -T copy-mode Enter # install tmux plugins automatically when tmux is started if "test ! -d ~/.tmux/plugins/tpm" \ |
