Hacker News new | ask | show | jobs
by srbravo1 4828 days ago
AFAIK there are tmux 'windows' which are like tabs and 'panes' which are vertical and horizontal splits in 1 tmux window

but assuming you mean 'panes', it seems you can:

Ctrl-b o

to move around the current window's panes clockwise. Although I prefer inputing a given direction like the other replier suggested with arrow keys.

For me moving between windows and panes is something that I do a lot. So much so that I removed the need to use the 'tmux prefix' to do so. In my ~/.tmux.conf I have for window and pane switching:

# set pane switching with <alt>{U, E, N, I} for up, down, left, right and respectively without needing prefix

bind -n M-N select-pane -L

bind -n M-I select-pane -R

bind -n M-U select-pane -U

bind -n M-E select-pane -D

# set window switching without needing prefix

bind -n M-a select-window -t :1

bind -n M-r select-window -t :2

bind -n M-s select-window -t :3

bind -n M-t select-window -t :4

bind -n M-d select-window -t :5

bind -n M-h select-window -t :6

You can just replace the keybindings I chose like M-a (alt-a) to something that works for you. If you want to keep using a prefix (incase you are worried the keybindings will clash with other program/system bindings), remove the '-n' flag. Hope that helps.

If it doesn't here is a tutorial I found from a google search: http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multip...

and IMO a really good book on Tmux if you decide to dive in more: http://www.amazon.com/tmux-Productive-Mouse-Free-Development...

1 comments

Thanks. Yes, I meant panes.

I also did the thing to get rid of the tmux prefix for pane switching. But since I don't use the function keys, I mapped keys F1 through F9 to various tmux functions. F1 = next pane, F2 = prev pane. One less key to press. :)

cool! Hehe, ya, one less key to press FTW! :D