Last active
December 25, 2015 12:49
-
-
Save charandas/6979766 to your computer and use it in GitHub Desktop.
tmux.conf using the new tmux copy-pipe command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start tmux shells with right hooks | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# vi keys | |
setw -g mode-keys vi | |
# Setup 'v' to begin selection as in Vim | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "/usr/local/bin/reattach-to-user-namespace pbcopy" | |
# Update default binding of `Enter` to also use copy-pipe | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "/usr/local/bin/reattach-to-user-namespace pbcopy" | |
# Unlimited history | |
set -g history-limit 30000 | |
# Mouse support | |
setw -g mode-mouse on | |
set-option -g mouse-select-pane on | |
set-option -g mouse-select-window on | |
set-window-option -g mode-mouse on | |
# battery | |
# set-option -g status-left '[Battery: #(/usr/local/bin/power.sh)] #[default] Windows:' | |
# Separate scroll buffers from history buffer | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# first session | |
new-session -s Basic -n zsh -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to use the full qualified path to reattach command in the copy-pipe tmux statements. Otherwise, this configuration borrows much from the thoughbot's post:
http://robots.thoughtbot.com/post/55885045171/tmux-copy-paste-on-os-x-a-better-future