Skip to content

Instantly share code, notes, and snippets.

@trusktr
Last active August 29, 2015 14:04
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 trusktr/a78d5fa157e79c5a78d5 to your computer and use it in GitHub Desktop.
Save trusktr/a78d5fa157e79c5a78d5 to your computer and use it in GitHub Desktop.
set-option -g default-shell /bin/zsh
set -g default-command /bin/zsh
set -g default-terminal "screen-256color"
# Choose your favorite prefix key.
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#?
set -g set-titles off
# ?
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
#?
setw -g monitor-activity on
set -g visual-activity on
set -g mode-keys vi
set -g history-limit 10000
# y and p as in vim
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"
bind -t vi-copy 'Space' halfpage-down
bind -t vi-copy 'Bspace' halfpage-up
# easy-to-remember split pane commands
bind v split-window -h
bind C-v split-window -h
bind s split-window -v
bind C-s split-window -v
bind-key c kill-pane
bind-key C-c kill-pane
unbind '"'
unbind %
# use ' and " to rename tabs (windows) and sessions, respectively.
bind-key '"' command-prompt -I '#S' "rename-session '%%'"
bind-key "'" command-prompt -I '#W' "rename-window '%%'"
#unbind $
#unbind ,
# moving between panes with vim movement keys (IJKL)
bind j select-pane -L
bind k select-pane -D
bind i select-pane -U
bind l select-pane -R
# moving between windows with vim movement keys
bind -r C-j select-window -t :-
bind -r C-l select-window -t :+
# resize panes with vim movement keys
bind -r J resize-pane -L 30
bind -r K resize-pane -D 15
bind -r I resize-pane -U 15
bind -r L resize-pane -R 30
# new "tab"
bind-key t new-window
bind-key C-t new-window
set -g base-index 1 # first tab/window is number 1.
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux.#I.#W ${PWD}"
# move panes from/to windows.
bind M-b break-pane -d
bind-key M-j command-prompt "join-pane -s %1 -h"
set-option -g status-bg colour237
set-option -g status-fg colour246
set-window-option -g window-status-current-fg colour14
set-window-option -g window-status-current-bg colour234
setw -g aggressive-resize on
# Set window notifications
setw -g monitor-activity on
setw -g monitor-content ""
set -g visual-content on
set -g visual-activity off
set-window-option -g window-status-activity-fg colour235
set-window-option -g window-status-activity-bg colour6
set-window-option -g status-interval 1
set-window-option -g status-right-fg cyan
set-window-option -g status-right-bg colour237
set-window-option -g status-right-length 100
bind R source-file "$HOME/.tmux.conf" \;
display-message "Configuration Reloaded."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment