This commit is contained in:
Daniel Flanagan 2017-04-28 21:43:23 -05:00
parent fffe5aea68
commit 8d4e1b3c6f
2 changed files with 15 additions and 8 deletions

View file

@ -81,3 +81,5 @@ Here are some bullet points on my workflow as a Web Developer:
* Vimux
* urxvt reizing
* urxvt fontawesome
* Alacritty as terminal?
* Cloud IRC

View file

@ -67,14 +67,6 @@ set -g pane-base-index 1
# custom predefined layouts
bind M-l source-file ~/.tmux/layouts/dev.tmux
# mimic pane switching in and out of vim
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 -g pane-border-fg colour18
set -g pane-active-border-fg blue
set -g pane-active-border-bg default
@ -84,6 +76,18 @@ bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
# mimic pane switching in and out of vim
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 -Tcopy-mode-vi 'C-h' send -X "cancel select-pane -L"
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
@ -95,6 +99,7 @@ set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'christoomey/vim-tmux-navigator'
# plugin options