Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some programs, like vim, look much better without the tmux status bar at the bottom. I have already set up a key that toggles the visibility of the status bar, but it would be even awesomer if the status bar just disappeared whenever I started vim.

Does tmux support anything so wonderful as this? Or could it be approached even from the .vimrc side? I would prefer something more elegant than alias vim='tmux set status; vim' if it is possible.

share|improve this question
up vote 3 down vote accepted

Add this to your .vimrc file:

autocmd VimEnter,VimLeave * silent !tmux set status
share|improve this answer
It isn't perfect! If you have two window in tmux and you'll run in every window vim, tmux status set off, and on at next vim. You can't use seperate status off by VimEnter and status on by VimLeave because of reason above. I think you should check if vim running or not (maybe via ps?) before run tmux set status. – uzsolt May 28 '12 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .