Last active
October 16, 2015 07:36
-
-
Save baopham/11072193 to your computer and use it in GitHub Desktop.
.tmux.conf
This file contains hidden or 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
# GistID: 11072193 | |
source-file ~/.tmux.reset.conf | |
set -g default-terminal "screen-256color" | |
set-option -g xterm-keys | |
# Change prefix key to ` | |
set-option -g prefix ` | |
unbind C-b | |
bind-key ` send-prefix | |
# we might need ` at some point, allow switching | |
bind-key C-a set-option -g prefix C-a | |
bind-key C-b set-option -g prefix ` | |
# Default key repeat is 500ms, lower to 125ms | |
# otherwise hitting up arrow right after moving to new window counts | |
# as moving back to window above | |
set -g repeat-time 125 | |
# Count from 1 | |
set-option -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
# More straight forward key bindings for splitting | |
unbind % | |
bind | split-window -h | |
bind _ split-window -v | |
# Vim style movement | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# Vim key in copy mode | |
setw -g mode-keys vi | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'C-v' rectangle-toggle | |
bind-key -t vi-copy 'y' copy-selection | |
# History | |
set -g history-limit 1000 | |
# Terminal emulator window title | |
set -g set-titles on | |
set -g set-titles-string '#S: #W' | |
# Notifying if other windows has activities | |
set -g visual-activity on | |
# Window modes color | |
setw -g mode-bg colour240 | |
setw -g mode-fg colour255 | |
# Message/command input colors | |
set -g message-bg colour240 | |
set -g message-fg colour255 | |
# Clock | |
setw -g clock-mode-colour colour250 | |
setw -g clock-mode-style 12 | |
# Mouse support | |
set -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 | |
# More custom binding | |
bind < resize-pane -L 3 | |
bind > resize-pane -R 3 | |
bind - resize-pane -D 3 | |
bind + resize-pane -U 3 | |
bind H command-prompt "resize-pane -L %1" | |
bind J command-prompt "resize-pane -D %1" | |
bind K command-prompt "resize-pane -U %1" | |
bind L command-prompt "resize-pane -R %1" | |
bind . command-prompt | |
bind q confirm kill-window | |
bind Q confirm kill-server | |
bind space command-prompt -p index "select-window -t %1" | |
bind tab next-layout | |
bind r source-file ~/.tmux.conf | |
# Make tmux work with system clipboard | |
# See: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
run-shell "/usr/local/bin/powerline-daemon -q" | |
source ~/.config/powerline/powerline/bindings/tmux/powerline.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment