Skip to content

Instantly share code, notes, and snippets.

@Mierenga
Created April 17, 2018 14:49
Show Gist options
  • Save Mierenga/ed30a9016f06346dbc3e7d2e5f236e1f to your computer and use it in GitHub Desktop.
Save Mierenga/ed30a9016f06346dbc3e7d2e5f236e1f to your computer and use it in GitHub Desktop.
# reload config file │
bind-key r source-file ~/.tmux.conf │
bind-key J resize-pane -D 20 │
bind-key K resize-pane -U 20 │
bind-key H resize-pane -L 20 │
bind-key L resize-pane -R 20 │
bind-key j resize-pane -D 5 │
bind-key k resize-pane -U 5 │
bind-key h resize-pane -L 5 │
bind-key l resize-pane -R 5 │
# Smart pane switching with awareness of Vim splits. │
# See: https://github.com/christoomey/vim-tmux-navigator │
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ │
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" │
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" │
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" │
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" │
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" │
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" │
bind-key -T copy-mode-vi C-h select-pane -L │
bind-key -T copy-mode-vi C-j select-pane -D │
bind-key -T copy-mode-vi C-k select-pane -U │
bind-key -T copy-mode-vi C-l select-pane -R │
bind-key -T copy-mode-vi C-\ select-pane -l │
# Status Bar solarized-dark (default) │
set-option -g status-bg black │
set-option -g pane-active-border-fg yellow │
set-option -g pane-border-fg cyan │
# recolor the active pane │
set -g window-style 'fg=white,bg=colour232' │
set -g window-active-style 'fg=white,bg=colour235' │
#set -g pane-active-border-bg 'colour17'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment