DEV Community

Cover image for tmux: 13 Cool Tweaks to Make It Personal and Powerful

tmux: 13 Cool Tweaks to Make It Personal and Powerful

Balamurugan Krishnamoorthy (Bala) on April 20, 2021

Intended Audience: tmux users (beginner) or who read the part one of my "Command Line Happiness" post or looking for best tips & tricks. Why ...
Collapse
 
jeklah profile image
Jeklah

Am I the only one who quite likes ctrl b as my tmux key?!

Also you can use ctrl d to kill a pane instantly. It will also close a window if it only has 1 pane. I often close my tmux sessions by ctrl d d d.

Collapse
 
eduardoweiland profile image
Eduardo Weiland

I use ctrl+b too. It was the default and I got used to it, I don't see any reason to change it now.

Collapse
 
krishnam profile image
Balamurugan Krishnamoorthy (Bala)

I often close my tmux sessions by ctrl d d d.

This is what I used to do. Later, setting up single key seems simple to use for me.

Collapse
 
waylonwalker profile image
Waylon Walker

I've had mine as ctrl-b for years and switched to crtl space this year to match my vim leader. Doesn't matter too much either way to me.

Collapse
 
venfah profile image
Venfah

I normally use ctrl + q as prefix because ctrl +q require two hands and ctrl + a is needed in bash to arrive to begining of the line.

Collapse
 
krishnam profile image
Balamurugan Krishnamoorthy (Bala) • Edited

ctrl + a is needed in bash to arrive to begining of the line.

we can use "send prefix" to make sure ctrl+a for bash is not affected. But, I understand it will lead to two steps approach. Let me try Ctr+q or I want to try with tilde also instead of a.

Thread Thread
 
z4rx profile image
Zolkin Andrew

Ctrl+space is also very popular prefix

Collapse
 
z4rx profile image
Zolkin Andrew

You can double press ctrl + a and tmux will understand it as simple bash ctrl+a.

Collapse
 
eduardoweiland profile image
Eduardo Weiland

I already use most of these settings. Tips 7, 8 and 9 (regarding pane management) are a must.

For people that use Vim/Nvim, it can get even better with vim-tmux-navigator, so it's possible to navigate seamlessly between tmux panes and vim splits.

Collapse
 
trueneu profile image
Pavel Gurkov

That's a great article, you've described everything I'm using :)

Collapse
 
waylonwalker profile image
Waylon Walker

I had no idea tmux could take screenshots, I gotta check that out.

Collapse
 
krishnam profile image
Balamurugan Krishnamoorthy (Bala) • Edited

using capture-pane , we can make that work like screenshot by auto-saving the buffer to file