Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (53 sloc) 2.25 KB
# Set default terminal emulation to xterm
set -g default-terminal 'xterm-256color'
# Set first window name to 'code'; Enable pbcopy and pbpaste under tmux
# set-option -g default-command "tmux rename-window 'code'; reattach-to-user-namespace -l zsh"
# Act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# Act like GNU screen
unbind C-b
set -g prefix C-a
# Cycle through panes using C-aa
unbind ^A
bind ^A select-pane -t :.+
# Reload config using 'r'
unbind r
bind r source-file ~/.tmux.conf
# Open a new pane on the right, 32% width
unbind C-w
bind C-w split-window -h -p 32
# Windows renumbered if one closes
set-option -g renumber-windows on
# Count window numbers starting with 1
set-option -g base-index 1
# Status bar colors (can take a hex value)
set -g status-bg '#333333'
set -g status-fg '#aaaaaa'
# Refresh status bar every second
set -g status-interval 1
# Set left-side status bar content
set -g status-left '#[default][#S]'
# Set right-side status bar content
set -g status-right "#(TZ=America/Los_Angeles date +%%I:%%M) %p %h %d %Y "
# Increase scrollback lines
set -g history-limit 10000
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Create new windows with the same path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# If run as "tmux attach", create a session if one does not already exist
# Needed to fix tmuxinator bug
set-window-option -g pane-base-index 1
Jump to Line
Something went wrong with that request. Please try again.