Skip to content

Instantly share code, notes, and snippets.

@dawehner
Created November 2, 2016 19:11
Show Gist options
  • Select an option

  • Save dawehner/b6c4c941cb62772f0bc0f29688c9ba39 to your computer and use it in GitHub Desktop.

Select an option

Save dawehner/b6c4c941cb62772f0bc0f29688c9ba39 to your computer and use it in GitHub Desktop.
# General settings
unbind C-b
unbind l
set -g prefix C-f
bind-key C-a last-window
set -g status-keys vi
# Faster Command Sequences
set -s escape-time 0
# mouse can be used to select panes
#set -g mouse-select-pane on
# Reload key
bind r source-file ~/.tmux.conf
# Extend histeroy
set -g history-limit 10000
# to make ctrl-arrow, etc. work
set-window-option -g xterm-keys on
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# Highlight active window
setw -g window-status-current-bg red
setw -g window-status-current-fg default
# switch panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes
bind ^L resize-pane -R 5
bind ^J resize-pane -D 5
bind ^K resize-pane -U 5
bind ^H resize-pane -L 5
# 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"
# Copy/paste to system clipboard
# bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# not really sure what this does, but with it, the scrollwheel works inside Vim
# set -g mouse-utf8 on
# mouse can be used to resize panes (by dragging dividers)
# set -g mouse-resize-pane on
# THEME
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default]'
# Fix LSOpenURLsWithRole() error on OS X. Requires reattach-to-user-namespace
# # to be installed.
set-option -g default-command "reattach-to-user-namespace -l fish"
set -g default-shell /usr/local/bin/fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment