git.fiddlerwoaroof.com
Browse code

ignore emacs for tmux navigation bindings

fiddlerwoaroof authored on 09/06/2017 17:49:11
Showing 1 changed files
... ...
@@ -3,11 +3,13 @@ set -g default-terminal "screen-noit"
3 3
 setw -g mode-keys vi
4 4
 
5 5
 # smart pane switching with awareness of vim splits
6
-bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
7
-bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
8
-bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
9
-bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
10
-bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
6
+bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq e emacs -e vim && tmux send-keys C-h) || tmux select-pane -L"
7
+bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys C-j) || tmux select-pane -D"
8
+bind j select-pane -D
9
+bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys C-k) || tmux select-pane -U"
10
+bind j select-pane -U
11
+bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys C-l) || tmux select-pane -R"
12
+bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys 'C-\\') || tmux select-pane -l"
11 13
 
12 14
 bind m set -g mouse on
13 15
 bind m set -g mouse off