Skip to content

Instantly share code, notes, and snippets.

@jgrodziski
Last active December 29, 2015 12:09
Show Gist options
  • Save jgrodziski/7668092 to your computer and use it in GitHub Desktop.
Save jgrodziski/7668092 to your computer and use it in GitHub Desktop.
# 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"
set -g prefix C-a
unbind C-b
set -sg escape-time 1
setw -g pane-base-index 1
bind | split-window -h
bind - split-window -v
bind -n S-Right next-window
bind -n S-Left previous-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# status bar
set -g base-index 1
set -g status-bg black
set -g status-fg white
set -g message-bg red
set -g message-fg white
set -g status-right-length 80
# General options
set-option -g pane-active-border-fg blue
set -g status-utf8 on
set -g default-terminal screen-256color
set -g status-keys vi
set -g bell-action any
set -g visual-bell off
set -g set-titles on
set -g set-titles-string '#S.#I.#P #W #T' # session.windowindex.paneindex windowname windowtitle
set -g status-left '#[fg=white]#[bg=black] #S.#I.#P #[default]'
set -g status-right "#(hostname)|#(uptime | awk -F: '{print $(NF\\)}' | sed s/' '//)"
#set -g mouse-select-pane on
# Window options
setw -g mode-mouse on
setw -g aggressive-resize on
setw -g monitor-activity on
setw -g window-status-bg black
setw -g window-status-current-bg blue
setw -g allow-rename off
# disable auto renaming
setw -g automatic-rename off
setw -g alternate-screen on
# Full screen
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment