3

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.

4

Add this to your .vimrc file:

autocmd VimEnter,VimLeave * silent !tmux set status
| improve this answer | |
  • 2
    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
0

Combine the problem uzsoft said and the answer from chepner, the problem is solved with: autocmd VimEnter,VimLeave * silent !tmux set status off

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.