0

I'm trying to use tmux (in xterm) in a vim friendly way. This is my .tmux.conf right now.

bind-key -n M-Down    select-pane -D
bind-key -n M-Up      select-pane -U
bind-key -n M-Left    select-pane -L
bind-key -n M-Right   select-pane -R

bind-key -n M-j       select-pane -D
bind-key -n M-k       select-pane -U
bind-key -n M-l       select-pane -L
bind-key -n M-h       select-pane -R

bind-key -n S-M-Right next-window
bind-key -n S-M-Left  previous-window
bind-key -n S-M-Up    split-window -h -c "#{pane_current_path}"
bind-key -n S-M-Down  split-window -v -c "#{pane_current_path}"

// these do not work
bind-key -n S-M-l     next-window
bind-key -n S-M-h     previous-window
bind-key -n S-M-k     split-window -h -c "#{pane_current_path}"
bind-key -n S-M-j     split-window -v -c "#{pane_current_path}"

The last four lines do not work and those shortcuts do not do anything else in either tmux or vim. Is there a reason that they don't work or are they bound to some global shortcut that I can't find?

  • 1
    There is no S (Shift) in the keybinds: use the uppercase variant of the letter. – jasonwryan Feb 21 '18 at 7:06
  • That worked. Although S works with the arrow keys so it does stand for Shift there. – hamid Feb 21 '18 at 9:19
1

S-l is L, so you should be binding M-L instead of S-M-l, and similarly for the other bindings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.