Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate keyboard shortcut for synchronize-panes?

Tags:

tmux

Via the pragmatic programmer, one of their .tmux.conf files has this for "synchronize-panes":

# shortcut for synchronize-panes toggle
# START:sync
bind C-s set-window-option synchronize-panes
# END:sync

I do not know how to run this. I find myself running setw synchronize-panes a lot both to turn this on and off. How can I send a keyboard shortcut to run this in tmux? A simple C-s does not work while using the .tmux.conf above.

like image 518
Scott Skiles Avatar asked Jan 08 '19 19:01

Scott Skiles


1 Answers

Your bind command means you have to press the prefix key (Control-b by default) then Control-s to run the command. If you want to just press Control-s then add the option -n to the bind:

bind -n C-s set-window-option synchronize-panes
like image 95
meuh Avatar answered Oct 03 '22 08:10

meuh