Created
April 17, 2014 22:20
-
-
Save supermarin/11014776 to your computer and use it in GitHub Desktop.
Tmux defaults that everyone should have in
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
# unfuck the terminal colors | |
set -g default-terminal "screen-256color" | |
# unfuck the Esc | |
set -s escape-time 0 | |
# unfuck mouse scrolling | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# unfuck copy and paste | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# after copying to a tmux buffer, hit y again to copy to clipboard | |
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"# Setup 'v' to begin selection as in Vim | |
# http://robots.thoughtbot.com/post/55885045171/tmux-copy-paste-on-os-x-a-better-future | |
bind-key -t vi-copy v begin-selection | |
if-shell '[[ ! -z "$OSX" ]]' 'bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"' 'bind-key -t vi-copy y copy-pipe "xclip -selection c"' | |
# Update default binding of 'Enter' to also use copy-pipe | |
unbind -t vi-copy Enter | |
if-shell '[[ ! -z "$OSX" ]]' 'bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"' 'bind-key -t vi-copy Enter copy-pipe "xclip -selection c"' | |
# unfuck UTF8 | |
set-window-option -g utf8 on | |
set-option -g status-utf8 on | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment