You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

151 lines
4.7 KiB

# Start window numbering at 1
set -g base-index 1
# Use 256 colors
# Note, this broke my colors in zsh, so off for now01/25/15
set -g default-terminal "screen-256color"
# COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# remap prefix to Ctrl+A
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# set up clock
set -g clock-mode-style 12
# renumber windows after removal
set -g renumber-windows on
# keep more history
set -g history-limit 10000
# no escape delay
set -sg escape-time 0
unbind %
bind | split-window -h
bind - split-window -v
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
setw -g monitor-activity on
setw -g visual-activity on
# mouse
setw -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
bind Z source-file ~/.tmux/dev
bind Q source-file ~/.tmux/devEditors
bind A source-file ~/.tmux/devMinimal
# use vim keybindings in copy mode
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"
unbind -t vi-copy Space
bind -t vi-copy Space jump-again
bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
# See this blog post for additional detail:
# http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-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"
# Secondary binding for C-l to retain redraw
bind C-l send-keys 'C-l'
# Easy rotating of panes
bind C-k swap-pane -U
set -g display-panes-time 600
# status bar stuff
set -g status-left-length 40
# Simplify status bar display.
set -g status-left '[#S]'
set -g status-right "%I:%M %p "
# set -g status-right "#[fg=red][44%%]#[default] -%I:%M %p "
# Dismiss current pane to background window
bind b break-pane -d
bind-key j command-prompt -p "join pane from: ""join-pane -h -s '%%'"
# more intuitive keybindings for splitting
bind \ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Easy return to Vim from tmux runner zoom runner pane
bind C-p run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys ':VtrZoomRunnerPane' 'C-m') || tmux send-keys 'C-c' && tmux select-pane -l"
# Make C-j display a selectable list of sessions
bind C-j choose-tree
# Keep window names as I set them
setw -g automatic-rename off
# reload tmux.conf with prefix-r
bind C-r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# bind resizing of panes to H,J,K,L (resizes by steps of 10 lines/columns)
# # Note, bindings are repeatable (within the default 500ms time limit) so that
# # you don't have to keep entering the prefix. (Prefix-H-H-H resizes by 15)
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
unbind -n C-Left
unbind -n C-Down
unbind -n C-Up
unbind -n C-Right
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5