Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tmux: Auto-hide panel when it loses focus

Tags:

vim

tmux

I've recently started using tmux for my Vim editing. In PyCharm, I used to have a terminal at the bottom which I could toggle in and out of the screen with a few keystrokes. I'd like to have the same ability with tmux: Edit code fullscreen in Vim, then when I need to run a command, go directly to a terminal pane at the bottom of the screen, then go back to fullscreen coding.

Is there any way I can configure tmux to do that?

like image 425
sdeleon28 Avatar asked Dec 03 '22 22:12

sdeleon28


1 Answers

Tmux has an inbuilt 'zoom' feature. By default it is mapped to <Prefix>z key appropriately.

This zooms into the current pane. Once you're done, you can hit the same key sequence again to zoom out and your other tmux panes (can be more than 1) will now appear back. You can then move to other panes to do other stuff.

like image 144
Dhruva Sagar Avatar answered Dec 28 '22 14:12

Dhruva Sagar