Ruslan Osipov
Ruslan Osipov

Reputation: 5843

Cycling through tmux panes

I am having trouble intuitively cycling through tmux panes. I use mod-n and mod-p, but I don't like having to execute 2 keypresses.

Recently, I discovered https://github.com/christoomey/vim-tmux-navigator, which works great for navigating tmux splits. Is there a solution for making navigating tmux panes as intuitive (preferably for a Vim user)?

Upvotes: 1

Views: 258

Answers (1)

Brett Y
Brett Y

Reputation: 7678

Add the following to your ~/.tmux.conf. The -n option means it is not necessary to use the prefix key (which I assume is the first of the two key presses you're talking about).

bind-key -n M-n next-window
bind-key -n M-p previous-window

Run tmux source ~/.tmux.conf to apply.

Upvotes: 2

Related Questions