Skip to content

Instantly share code, notes, and snippets.

@agounaris
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agounaris/7e6393cc57f1654e4ce9 to your computer and use it in GitHub Desktop.
Save agounaris/7e6393cc57f1654e4ce9 to your computer and use it in GitHub Desktop.
tmux configuration
set -g status on
set -g status-keys vi
set -g history-limit 1000000
# 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"
# Set prefix to Ctrl-Space
unbind C-b
set -g prefix C-Space
bind Space send-prefix
# Switching panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
# Fixes for ssh-agent
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# 1.9 open new panes in $PWD
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Status bar
set -g status-bg black
set -g status-fg white
set -g status-interval 10
set -g status-left-length 50
set -g status-left "#[fg=green][#I:#P #W] #(whoami)@#(hostname -s)"
set -g status-right "#[fg=colour45]%a %d/%m %H:%M#[fg=default]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment