Moving tmux panes

Written by Michael Lee on March 18, 2018

I spend a lot of time on the command line. Whether it be for writing or coding, I do it all within the command line. One of the tools that allows me to work in the command line all day is tmux.

Tmux allows me to take a single command line window and split it up using a feature called panes. With panes I usually split my window up at least into two panes. Where the top is usually where I’m doing my writing or coding and the bottom is usually running a server and is used to find files and make commits to git.

I often will start tmux and forget to first open vim so that it’s at the top of my window and then split vertically. Which means my setup is reversed from the way I like it.

Thankfully tmux has a way to move your panes around so that you can get it in the order that you like.

To move your tmux panes around on your window, you’ll want to use your prefix + ctrl + o. What this combination does is, cycles your panes positioning upwards. So if you’ve got three panes open in your window, hitting prefix + ctrl + o will move the panes in a clock-wise direction. In the case of two panes, it’ll swap the two panes in the window.

Thanks for taking the time to read this article. I'd love to stay in touch and share more tips on programming and design, side projects and working remotely. Sign up and I'll send you my articles straight to your email.

:wave: Hey hey, I'm Michael Lee! I really appreciate you taking the time to read this article.

Be sure to check out my other articles.

Previous post: Blender's history