aboutsummaryrefslogtreecommitdiff
path: root/.tmux.conf
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-10 18:32:12 +0300
committereug-vs <eug-vs@keemail.me>2021-01-06 21:28:40 +0300
commitc4ae2519dc8238390624af05602c364b39b5b77d (patch)
tree9fccc440474b5ad3b2c099c4ab8d3d95607b0874 /.tmux.conf
parentc3b78d929f3c0bf58890904ea3c07b470057b35f (diff)
downloaddotfiles-c4ae2519dc8238390624af05602c364b39b5b77d.tar.gz
feat: bind all movements to Super+hjkl
Diffstat (limited to '.tmux.conf')
-rw-r--r--.tmux.conf7
1 files changed, 6 insertions, 1 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 58528b7..60602d6 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -22,8 +22,13 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection c
# Vi mode
set-window-option -g mode-keys vi
+is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?|vifm)(diff)?$"'
+bind -r left if-shell "$is_vim" "send-keys C-h" "run-shell 'tmux_sys_win_aware_navigation.sh left && tmux rename-window #{pane_current_command}'"
+bind -r down if-shell "$is_vim" "send-keys C-j" "run-shell 'tmux_sys_win_aware_navigation.sh down && tmux rename-window #{pane_current_command}'"
+bind -r up if-shell "$is_vim" "send-keys C-k" "run-shell 'tmux_sys_win_aware_navigation.sh up && tmux rename-window #{pane_current_command}'"
+bind -r right if-shell "$is_vim" "send-keys C-l" "run-shell 'tmux_sys_win_aware_navigation.sh right && tmux rename-window #{pane_current_command}'"
+
# Plugins
-set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'