Last active
August 29, 2015 13:56
-
-
Save disintegrator/9042600 to your computer and use it in GitHub Desktop.
My tmux config so far...
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
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g renumber-windows on | |
# vi is good | |
setw -g mode-keys vi | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
# mouse behavior | |
setw -g mode-mouse on | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
set -g mouse-select-window on | |
set-option -g default-terminal screen-256color | |
bind-key : command-prompt | |
bind-key r refresh-client | |
bind-key L clear-history | |
bind-key space next-window | |
bind-key bspace previous-window | |
bind-key enter next-layout | |
# use vim-like keys for splits and windows | |
bind-key v split-window -h | |
bind-key s split-window -v | |
# smart pane switching with awareness of vim splits | |
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U" | |
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R" | |
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys 'C-\\') || tmux select-pane -l" | |
bind C-l send-keys 'C-l' | |
bind-key C-o rotate-window | |
bind-key + select-layout main-horizontal | |
bind-key = select-layout main-vertical | |
set-window-option -g other-pane-height 25 | |
set-window-option -g other-pane-width 80 | |
bind-key a last-pane | |
bind-key q display-panes | |
bind-key c new-window | |
bind-key t next-window | |
bind-key T previous-window | |
bind-key [ copy-mode | |
bind-key ] paste-buffer | |
setw -g display-panes-time 1500 | |
set-option -g status-right '%l:%M%p' | |
# Set window notifications | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# Allow the arrow key to be used immediately after changing windows | |
set-option -g repeat-time 0 | |
# Allow arrows to navigate splits | |
bind-key Up select-pane -U | |
bind-key Down select-pane -D | |
bind-key Left select-pane -L | |
bind-key Right select-pane -R | |
set -g status-bg colour27 | |
set-window-option -g status-left " #S " | |
set-window-option -g status-left-fg colour232 | |
set-window-option -g status-left-bg white | |
set-window-option -g status-right " %H:%M %d-%b-%y " | |
set-window-option -g status-right-fg colour232 | |
set-window-option -g status-right-bg white | |
set-window-option -g window-status-format " #I: #W " | |
set-window-option -g window-status-fg colour232 | |
set-window-option -g window-status-current-format " #I: #W " | |
set-window-option -g window-status-current-fg colour232 | |
set-window-option -g window-status-current-bg white | |
set-window-option -g window-status-activity-attr none | |
set-window-option -g window-status-activity-fg colour226 | |
set-window-option -g window-status-bell-attr none | |
set-window-option -g window-status-bell-fg red | |
set-window-option -g window-status-content-attr none | |
set-window-option -g window-status-content-fg cyan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment