Created
August 11, 2015 18:44
-
-
Save wckdouglas/134ffe2197885433819b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # change prefix | |
| unbind-key C-b | |
| set -g prefix C-a | |
| bind-key C-a send-prefix | |
| #set -g default-terminal "xterm" | |
| #set-window-option -g xterm-keys on | |
| #set-option -g renumber-windows on | |
| #power line | |
| run-shell "powerline-daemon -q" | |
| source "$(powerline directory)/bindings/tmux/powerline.conf" | |
| # clear key for new bindings | |
| unbind-key p | |
| unbind-key t | |
| unbind-key i | |
| unbind-key s | |
| unbind-key j | |
| unbind-key l | |
| unbind-key w | |
| unbind-key f | |
| unbind-key n | |
| # pane movements | |
| bind-key s splitw -h -p 50 | |
| bind-key i splitw -v -p 50 | |
| bind-key f break-pane | |
| bind-key j join-pane -h -p 50 -s ! | |
| bind-key w killp | |
| bind-key t new-window | |
| bind-key n new-window | |
| #set-window-option -g mode-keys vi | |
| bind-key -t vi-copy 'v' begin-selection | |
| bind-key -t vi-copy 'y' copy-selection | |
| bind-key p paste-buffer | |
| #vim integration | |
| # Smart pane switching with awareness of vim splits | |
| is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' | |
| bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
| bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
| bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
| bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
| bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" | |
| set-option -g renumber-windows on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment