aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/common/.tmux.conf12
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" \