You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.3 KiB

11 years ago
set-option -g default-terminal "screen-256color"
## messages
set-option -g display-time 3000
## scrollback buffer
set-option -g history-limit 10000
11 years ago
## unicode
set-option -g status-utf8 on
set-window-option -g utf8 on
## window notifications
set-option -g visual-activity on
set-window-option -g monitor-activity off
## title
set-option -g set-titles on
set-option -g set-titles-string "[#S] #I:#W"
set-option -g automatic-rename on
## mouse
set-window-option -g mouse off
11 years ago
# copy and paste
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
## etc
set-window-option -g mode-keys vi
set-option -sg escape-time 1 # increase vim responsiveness
set-option -g base-index 1
## screen bindings
bind a send-prefix
bind c new-window
bind C-c new-window
11 years ago
bind d detach
bind C-d detach
bind n next-window
bind C-n next-window
bind p previous-window
bind C-p previous-window
bind C-a last-window
set-option -g renumber-windows on;
bind c new-window -c '#{pane_current_path}';
bind C-c new-window -c '#{pane_current_path}';
bind v split-window -h -c '#{pane_current_path}';
bind s split-window -v -c '#{pane_current_path}';
11 years ago
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
bind C-l send-keys 'C-l'
bind -r < resize-pane -L 3
bind -r > resize-pane -R 3
bind -r - resize-pane -D 3
bind -r + resize-pane -U 3
bind -r = resize-pane -U 3
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf'
source-file ~/.dotfiles/src/powerline/powerline/bindings/tmux/powerline.conf
if-shell "[[ -e ~/.tmux.conf.local ]]" "source-file ~/.tmux.conf.local"