From 0d9d10eaebabb01a724ae230f147efa80872298d Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 28 Aug 2014 09:00:24 -0400 Subject: [PATCH] Added the ability to save scrollback with W --- README.md | 1 + tmux.normal.conf | 3 +++ tmux.powerline.conf | 3 +++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index cad5e16..aef9224 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ * `y` and `Ctrl-p`: Enter __copy mode__ and paste from the copy buffer respectively. * (**copy mode**) `v`, `y` and `Escape`: Begin selection, copy selection and cancel **copy mode** respectively. * `Alt-[0-9]` (no prefix): Switch directly to the given window. +* `W`: Write scrollback buffer to file. ## Italics Support ## diff --git a/tmux.normal.conf b/tmux.normal.conf index 8eb56f1..e0e677a 100644 --- a/tmux.normal.conf +++ b/tmux.normal.conf @@ -127,6 +127,9 @@ bind -n M-7 select-window -t 7 bind -n M-8 select-window -t 8 bind -n M-9 select-window -t 9 bind -n M-0 select-window -t 10 +# +# save scrollback to file +bind-key W command-prompt -p 'write scrollback to file:' -I '~/tmux-history.txt' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' # STATUS LINE # diff --git a/tmux.powerline.conf b/tmux.powerline.conf index 372dfd5..7fd3511 100644 --- a/tmux.powerline.conf +++ b/tmux.powerline.conf @@ -127,6 +127,9 @@ bind -n M-7 select-window -t 7 bind -n M-8 select-window -t 8 bind -n M-9 select-window -t 9 bind -n M-0 select-window -t 10 +# +# save scrollback to file +bind-key W command-prompt -p 'write scrollback to file:' -I '~/tmux-history.txt' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' # STATUS LINE #