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 | 810ce0a432baf377bb125f8ba43375e68f6b66ff (patch) | |
| tree | fec27b5ff8302685d9a25d68ad531f525f58caaa /dotfiles | |
| parent | 794f19e17e23786b33fba76f87ed5caf026cb2b8 (diff) | |
| download | archsetup-810ce0a432baf377bb125f8ba43375e68f6b66ff.tar.gz archsetup-810ce0a432baf377bb125f8ba43375e68f6b66ff.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.
Diffstat (limited to 'dotfiles')
| -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" \ |
