Skip to content

Instantly share code, notes, and snippets.

@tanaka51
Created June 9, 2015 07:35
Show Gist options
  • Save tanaka51/974139f8215151bcf197 to your computer and use it in GitHub Desktop.
Save tanaka51/974139f8215151bcf197 to your computer and use it in GitHub Desktop.
# mode
set -g mode-keys vi
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# default shell
set -g default-shell /usr/local/bin/zsh
# prefix
set -g prefix C-z
bind C-z send-prefix
unbind C-b
# delay between prefix and command
set -s escape-time 1
# Set the base index for windows and panes to 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# mouse
# set -g mode-mouse on
set -g mode-mouse off
# 256
set -g default-terminal screen-256color
# Option
setw -g utf8 on
set -g history-limit 100000
## key bindings
# reload config
bind C-r source-file ~/.tmux.conf \; display 'Reloaded ~/.tmux.conf'
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind l select-pane -R
bind k select-pane -U
# Quick windows selection
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
## color
# status
set -g status-fg blue
set -g status-bg black
set -g status-left-length 30
set -g status-left '#[fg=white,bg=black]#H#[fg=white]:#[fg=white][#S#[fg=white]][#[default]'
set -g status-right '#[fg=black,bg=blue,bold] [%Y-%m-%d(%a) %H:%M]#[default]'
# window-status-current
setw -g window-status-current-fg black
setw -g window-status-current-bg blue
setw -g window-status-current-attr bold#,underscore
# pane-active-border
set -g pane-active-border-fg black
set -g pane-active-border-bg blue
# Mac OSX specific configuration
# Enable to sync text between vim on tmux and OSX clipboard
# http://qiita.com/yuku_t/items/bea95b1bc6e6ca8a495b
set -g default-command "reattach-to-user-namespace -l zsh"
# tmux plugin manager
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-open \
tmux-plugins/tmux-yank \
"
# Initialize tpm
run-shell ~/.tmux/plugins/tpm/tpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment