tmux.conf (2781B)
1 # colors{{{ 2 # change pane border 3 set -g pane-border-fg blue 4 set -g pane-border-bg default 5 set -g pane-active-border-fg blue 6 set -g pane-active-border-bg default 7 8 #}}} 9 # mappings{{{1 10 # vi keys for moving around panes 11 bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys M-h) || tmux select-pane -L" 12 bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys M-j) || tmux select-pane -D" 13 bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys M-k) || tmux select-pane -U" 14 bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys M-l) || tmux select-pane -R" 15 bind -n M-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'M-\\') || tmux select-pane -l" 16 17 # vi keys for resizing around panes 18 bind-key -r H resize-pane -L "5" 19 bind-key -r J resize-pane -D "5" 20 bind-key -r K resize-pane -U "5" 21 bind-key -r L resize-pane -R "5" 22 23 # vi keys for changing windows 24 bind-key h previous-window 25 bind-key l next-window 26 27 # vi split window keys 28 bind-key "v" split-window -h 29 bind-key "s" split-window -v 30 31 # use double ctrl+space to switch to last window 32 bind-key C-Space last-window 33 34 # prefix r to reload this file 35 bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf Reloaded" 36 37 # set vi mode keys 38 setw -g mode-keys vi 39 40 # better vi like copy/pasting 41 unbind [ 42 bind Escape copy-mode 43 unbind p 44 bind p paste-buffer 45 bind-key -t vi-copy 'v' begin-selection 46 bind-key -t vi-copy 'y' copy-selection 47 48 # remap prefix to Ctrl+Space 49 set -g prefix C-Space 50 unbind C-b 51 52 #}}} 53 # classic status{{{1 54 set -g status-bg colour0 55 56 set -g window-status-current-fg white 57 set -g window-status-current-bg blue 58 set -g window-status-current-attr bright 59 60 set -g window-status-last-fg white 61 set -g window-status-last-bg default 62 set -g window-status-last-attr bright 63 64 set -g window-status-fg white 65 set -g window-status-bg default 66 set -g window-status-attr dim 67 68 set -g message-fg white 69 set -g message-bg blue 70 set -g message-attr bright 71 72 set -g status-interval 1 73 set -g status-justify centre 74 set -g status-left-length 158 75 set -g status-right-length 140 76 77 set -g status-left '\ 78 #[fg=blue]#{pane_current_path} \ 79 #[fg=green]%m/%d \ 80 #[fg=cyan]#S \ 81 ' 82 set -g status-right '\ 83 #[fg=cyan]##P \ 84 #[fg=green]%l:%M \ 85 #[fg=blue]#H\ 86 ' 87 88 setw -g window-status-format "#I #W" 89 setw -g window-status-current-format "#I #W" 90 91 #}}} 92 # start window numbering at 1, not 0 93 set -g base-index 1 94 95 set -g mode-mouse on 96 97 set -g default-terminal "screen-256color" 98 99 run-shell ~/.tmux/tmux-yank/yank.tmux 100