Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created January 31, 2014 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhysd/8728783 to your computer and use it in GitHub Desktop.
Save rhysd/8728783 to your computer and use it in GitHub Desktop.
diff --git a/tmux.conf b/tmux.conf
index 03f3398..3b79903 100644
--- a/tmux.conf
+++ b/tmux.conf
@@ -120,6 +120,9 @@ bind-key -t vi-copy 'C-j' bottom-line
bind-key -t vi-copy 'C-k' top-line
bind-key -t vi-copy 'C-h' back-to-indentation
bind-key -t vi-copy 'C-l' end-of-line
+
+# capture the buffer
+bind-key C command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
# }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment