Skip to content

Instantly share code, notes, and snippets.

@jkup
Created August 3, 2014 01:01
Show Gist options
  • Save jkup/272a88e50045e01764c5 to your computer and use it in GitHub Desktop.
Save jkup/272a88e50045e01764c5 to your computer and use it in GitHub Desktop.
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind '\'
bind '\' confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# split -v |
unbind |
bind | split-window
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window
set -s escape-time 0
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Start window numbering at 1
set -g base-index 1
# Colors
set -g status-bg colour234
set -g status-fg colour15
# More scrollback
set -g history-limit 10000
# Vi keys in scrollback
set-window-option -g mode-keys vi
set-option -g renumber-windows on
# Colors
set -g status-bg colour233
set -g status-fg colour252
set-option -g pane-border-fg colour167
set-option -g pane-active-border-fg colour106
set-option -g status-left "#[fg=colour232,bg=colour252,bold] #S "
set-option -g status-right "#[fg=colour232,bg=colour252,bold] #{host} "
set-window-option -g window-status-format "#[fg=colour167,bg=colour234] #I #W "
set-window-option -g window-status-current-format "#[fg=colour106,bg=colour234,bold] #I #W "
# Use vim keybindings in copy mode
setw -g mode-keys vi
#
# # Setup 'v' to begin selection as in Vim
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"
source '/Users/admin/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf'
# instructs tmux to expect UTF-8 sequences
setw -g utf8 on
set -g status-utf8 on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment