Skip to content

Instantly share code, notes, and snippets.

@jsutlovic
Last active August 29, 2015 14:13
Show Gist options
  • Save jsutlovic/b3d03971b9336192e889 to your computer and use it in GitHub Desktop.
Save jsutlovic/b3d03971b9336192e889 to your computer and use it in GitHub Desktop.
tmux config
# Use something easier to type as the prefix.
set -g prefix C-f
unbind C-b
bind C-f send-prefix
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# 256 colors please
set -g default-terminal "screen-256color"
# Window switching
bind-key -n M-Right next
bind-key -n M-Left prev
bind-key -n M-h prev
bind-key -n M-l next
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r Left resize-pane -L 2
bind -r Down resize-pane -D 2
bind -r Up resize-pane -U 2
bind -r Right resize-pane -R 2
# switch windows alt+number
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
# Let vim play well with tmux
set-window-option -g xterm-keys on
# Mouse scrolling in copy mode
setw -g mode-mouse on
if '[ -d "$HOME/.powerline" ]' 'source "$HOME/.powerline/powerline/bindings/tmux/powerline.conf"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment