Created
May 2, 2015 08:32
-
-
Save JasYoung315/2428376ccf6aeec6f670 to your computer and use it in GitHub Desktop.
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
########################### | |
# Configuration | |
########################### | |
# set Ctrl-a as the default prefix key combination | |
set -g prefix C-a | |
# use 256 term for pretty colors | |
set -g default-terminal "screen-256color" | |
# increase scroll-back history | |
set -g history-limit 5000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# disable mouse | |
setw -g mode-mouse off | |
# decrease command delay (increases vim responsiveness) | |
set -sg escape-time 1 | |
# increase repeat time for repeatable commands | |
set -g repeat-time 1000 | |
# start window index at 1 | |
set -g base-index 1 | |
# start pane index at 1 | |
setw -g pane-base-index 1 | |
# re-number windows when one is closed | |
set -g renumber-windows on | |
########################### | |
# Status Bar | |
########################### | |
# enable UTF-8 support in status bar | |
set -g status-utf8 on | |
# set refresh interval for status bar | |
set -g status-interval 30 | |
# center the status bar | |
set -g status-justify left | |
# show session, window, pane in left status bar | |
set -g status-left-length 40 | |
set -g status-right "" | |
########################### | |
# Colors | |
########################### | |
# color status bar | |
set -g status-bg colour235 | |
set -g status-fg white | |
# highlight current window | |
set-window-option -g window-status-current-fg black | |
set-window-option -g window-status-current-bg green | |
# set color of active pane | |
set -g pane-border-fg colour235 | |
set -g pane-border-bg black | |
set -g pane-active-border-fg green | |
set -g pane-active-border-bg black | |
# Smart pane switching with awareness of vim splits | |
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' | |
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" | |
########################### | |
# New Pane | |
########################### | |
bind-key % split-window -h -c "#{pane_current_path}" | |
bind-key '"' split-window -c "#{pane_current_path}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment