Skip to content

Instantly share code, notes, and snippets.

@esayler
Created September 17, 2015 18:49
Show Gist options
  • Save esayler/3b68466f5bc2526c4d44 to your computer and use it in GitHub Desktop.
Save esayler/3b68466f5bc2526c4d44 to your computer and use it in GitHub Desktop.
#### COPY/PASTE ####
## vi keybindings in copy mode
setw -g mode-keys vi
# setup 'v' to begin selection in copy mode
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
## quickly cycle through panes
unbind ^A
bind ^A select-pane -t :.+
# reload this config file
bind r source-file ~/.tmux.conf \; display ".tmux.conf reloaded"
### POWERLINE ###
run-shell "powerline-daemon -q"
source ~/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf
set -g allow-rename off
setw -g automatic-rename off
### Reset PREFIX
set -g prefix C-a
# bind C-a send-prefix # hit C-a twice for applications within tmux
## bind-key a send-prefix # for nested tmux sessions
unbind C-b
# change default delay (incr vim response?)
set -sg escape-time 1
# set default index to 1
set -g base-index 1
# set starting index for panes to
setw -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
# enable pbcopy and pbpaste
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md
set-option -g default-command "reattach-to-user-namespace -l zsh"
# window splitting
bind \ split-window -h
unbind '"'
bind - split-window -v
unbind %
# remap pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# resizing panes
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window off
# status-bar
#setw -g monitor-activity on
#set -g visual-activity on
# enable UTF-8 support in status bar
#set -g status-utf8 on
# set refresh interval for status bar
set -g status-interval 2
# 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-left '#[fg=green]#S#[fg=blue] #I:#P#[default] '
#set -g status-justify centre
# show hostname, date, time, and battery in right status bar
#set-option -g status-right '#[fg=green]#H#[default] %m/%d/%y %I:%M\
#[fg=red]#(battery discharging)#[default]#(battery charging)'
# colors
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment