Created
January 21, 2015 13:18
-
-
Save rubbsdecvik/4004ec6e578c00c0ee69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # act like GNU screen | |
unbind C-b | |
set -g prefix C-a | |
# Allow C-A a to send C-A to application | |
bind C-a last-window | |
bind-key a send-prefix | |
# start window index of 1 | |
set-option -g base-index 1 | |
setw -g pane-base-index 1 | |
# sane scrolling | |
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# UTF-8 | |
set-option -g status-utf8 on | |
#supposedly fixes pausing in vim | |
set-option -sg escape-time 1 | |
# set-window-option -g mode-mouse on | |
# set-option -g mouse-select-pane on | |
# set-option -g mouse-resize-pane on | |
# set-option -g mouse-select-window on | |
# act like vim | |
set -g status-keys vi | |
set-window-option -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind-key -r C-h select-window -t :- | |
bind-key -r C-l select-window -t :+ | |
set -g history-limit 5000 | |
setw -g xterm-keys on | |
# Rather than constraining window size to the maximum size of any client | |
# connected to the *session*, constrain window size to the maximum size of any | |
# client connected to *that window*. Much more reasonable. | |
setw -g aggressive-resize on | |
# # Rebinding the pane splitting bindings | |
# unbind % # Remove default bindings since we're replacing | |
bind | split-window -h | |
bind - split-window -v | |
# # Set window notifications | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# panes | |
# 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 | |
# Make current pane exactly 80 Chars wide | |
bind-key -r E resize-pane -x 80 | |
# Select specific pane | |
bind-key / display-panes \; select-pane -t :. | |
# Rotate Panes | |
bind-key -r R rotate-window -U | |
# statusbar -------------------------------------------------------------- | |
# # Refresh the status bar every 30 seconds. | |
set-option -g status-interval 30 | |
# # The status bar itself. | |
set -g status-justify left | |
set -g status-left-length 40 | |
set-option -g display-time 1000 | |
# Reload source file | |
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded" | |
# Macros | |
# Toggle send to all | |
bind-key S setw synchronize-panes | |
# Show url in buffer | |
bind C-o run-shell "open $(tmux show-buffer)" | |
# Pipe pane to log file | |
bind-key P pipe-pane -o "cat >>$HOME/#W-tmux.log" \; display-message "Toggled logging to $HOME/#W-tmux.log" | |
# 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" | |
# OSX Clipboard support | |
source ~/.tmux.clipboard | |
set-option -g default-command 'command -v reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace -l "$SHELL" || exec "$SHELL"' | |
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" | |
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
# Linux clipboard support | |
bind C-p run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" | |
bind C-y run "tmux save-buffer - | xclip -i -selection clipboard" | |
#### COLOUR (Solarized dark) | |
# Set 256 colors | |
set -g default-terminal "screen-256color" | |
# default statusbar colors | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour130 #yellow | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour33 #base0 | |
set-window-option -g window-status-bg default | |
#set-window-option -g window-status-attr dim | |
# active window title colors | |
set-window-option -g window-status-current-fg colour196 #orange | |
set-window-option -g window-status-current-bg default | |
#set-window-option -g window-status-current-attr bright | |
# pane border | |
set-option -g pane-border-fg colour235 #base02 | |
set-option -g pane-active-border-fg colour46 #base01 | |
# message text | |
set-option -g message-bg colour235 #base02 | |
set-option -g message-fg colour196 #orange | |
# pane number display | |
set-option -g display-panes-active-colour colour20 #blue | |
set-option -g display-panes-colour colour196 #orange | |
# clock | |
set-window-option -g clock-mode-colour colour40 #green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment