Last active
August 29, 2015 14:25
-
-
Save gyli/77f68ac7f2245becd461 to your computer and use it in GitHub Desktop.
My tmux config
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
# unbind some default keybindings | |
unbind C-b | |
# set prefix key to ctrl-a | |
set -g prefix C-a | |
# pass through a ctrl-a if you press it twice | |
bind C-a send-prefix | |
# vim style bindings for pane movement | |
bind -r h select-pane -L | |
bind -r j select-pane -D | |
bind -r k select-pane -U | |
bind -r l select-pane -R | |
# better mnemonics for splitting panes | |
bind | split-window -h | |
bind - split-window -v | |
# turn on 256 color support in tmux | |
set -g default-terminal "screen-256color" | |
# getting tmux to copy a buffer to system clipboard | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# use p to paste in tmux | |
unbind p | |
bind p paste-buffer | |
# use y to send the pasted text to system | |
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind -t vi-copy Escape cancel | |
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
# Allow mouse scolling | |
setw -g mode-mouse off | |
set -g mouse-select-pane off | |
set -g mouse-resize-pane off | |
set -g mouse-select-window off | |
# Refresh config | |
bind r source-file ~/.tmux.conf \; display "Configuration Reloaded!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment