Skip to content

Instantly share code, notes, and snippets.

@nicohvi
Created June 14, 2015 12:48
Show Gist options
  • Save nicohvi/fdd5a6e3daaadcfe423b to your computer and use it in GitHub Desktop.
Save nicohvi/fdd5a6e3daaadcfe423b to your computer and use it in GitHub Desktop.
tmux.conf
set -g default-terminal "screen-256color"
setw -g utf8 on
set -g status-utf8 on
# set window and pane indices at 1
set -g base-index 1
setw -g pane-base-index 1
# highlight window when it has new activity
setw -g monitor-activity on
set -g visual-activity on
# re-number windows when one is closed
set -g renumber-windows on
# ------- colors ---------
set -g status-bg colour235
set -g status-fg white
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg green
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
# window splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# force config reload
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# scrolling history
set -g history-limit 5000
# scrolling traversal
setw -g mode-keys vi
setw -g mode-mouse on
# pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# copy and send to os x clipboard
# (first, enable pbcopy and pbpaste)
# set-option -g default-command "reattach-to-user-namespace -l zsh"
unbind [
bind v copy-mode
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"
# kill window with k
unbind &
bind k kill-window
# bind swap window to T
bind-key T swap-window -t 0 # swaps current window to top
# always use zsh
set-option -g default-shell /bin/zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment