Created
January 31, 2014 04:33
-
-
Save armeo/8726650 to your computer and use it in GitHub Desktop.
Tmux Config
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
# Ctrl-b is a bad prefix key, use Ctrl-a instead | |
set-option -g prefix C-a | |
unbind-key C-b | |
# Also assign Ctrl-a to send the prefix to a remote session | |
bind-key C-a send-prefix | |
# Windows should be numbered from 1 like panes | |
set -g base-index 1 | |
# Disable tmux waiting for an escape sequence | |
set-option -sg escape-time 0 | |
# use mouse | |
set-option -g mode-mouse on | |
set-option -g mouse-select-pane on | |
set-option -g mouse-resize-pane on | |
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# options | |
set-option -g default-terminal xterm-256color | |
set-option -g display-time 2000 | |
set-option -g history-limit 10000 | |
set-option -g pane-active-border-bg colour240 | |
set-option -g status-utf8 on | |
set-option -g visual-activity on | |
# window options | |
set-window-option -g alternate-screen on | |
set-window-option -g mode-keys vi | |
set-window-option -g main-pane-height 35 | |
set-window-option -g main-pane-width 100 | |
set-window-option -g monitor-activity on | |
set-window-option -g utf8 on | |
set-window-option -g automatic-rename off | |
# status | |
set-option -g status-interval 1 | |
set-option -g status-left-length 20 | |
set-option -g status-left '' | |
set-option -g status-right '%Y-%m-%d %H:%M:%S ' | |
set-option -g status-bg blue | |
set-window-option -g window-status-bg blue | |
set-window-option -g window-status-current-bg black | |
set-window-option -g window-status-current-fg blue | |
set-window-option -g window-status-current-attr bold | |
# keybinds | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
bind-key K confirm-before kill-window | |
bind-key X confirm-before kill-pane | |
bind-key \ confirm-before kill-session | |
bind-key C-f last-window | |
bind-key -r C-n next-window \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key -r C-p previous-window \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key -r N swap-window -t:+ | |
bind-key -r P swap-window -t:- | |
bind-key s split-window -v | |
bind-key v split-window -h | |
bind-key B break-pane | |
bind-key O join-pane -t:-.bottom-right | |
bind-key j select-pane -D # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key C-j select-pane -D # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key k select-pane -U # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key C-k select-pane -U # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key h select-pane -L # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key C-h select-pane -L # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key l select-pane -R # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key C-l select-pane -R # \; run-shell 'ruby ~/.tmux/vim_helper.rb' | |
bind-key K swap-pane -U | |
bind-key J swap-pane -D | |
bind-key -r < resize-pane -L 1 | |
bind-key -r > resize-pane -R 1 | |
bind-key -r - resize-pane -D 1 | |
bind-key -r + resize-pane -U 1 | |
bind-key -r L next-layout | |
bind-key -r Space rotate-window | |
bind-key C-c run "tmux save-buffer - | /opt/local/bin/reattach-to-user-namespace pbcopy" | |
bind-key C-v run "/opt/local/bin/reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
bind-key R source ~/.tmux.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment