There is a number of default keybindings in tmux that create menus of various sorts. Apparently, these keybindings open-code the entire menu they are displaying:
bind-key -T prefix < display-menu -T "#[align=centre]#{window_index}:#{window_name}" -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l { swap-window -t :-1 } "#{?#{>:#{session_windows},1},,-}Swap Right" r { swap-window -t :+1 } "#{?pane_marked_set,,-}Swap Marked" s { swap-window } '' Kill X { kill-window } Respawn R { respawn-window -k } "#{?pane_marked,Unmark,Mark}" m { select-pane -m } Rename n { command-prompt -F -I "#W" { rename-window -t "#{window_id}" "%%" } } '' "New After" w { new-window -a } "New At End" W { new-window }
I find them very useful, but I'd like to move some of these to different keys (e.g. I'd like to move <
and >
to [
and ]
). However, copying the entire menu definition into my config seems suboptimal because I'll never notice if it changes upstream.
Is there any way I can "move" an existing tmux keybinding onto a different key, without repeating its definition in my .tmux.conf
?