Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I run vim in tmux, it only takes up half the screen (usually the left half). I would like vim to use up the whole screen, but don't know how. Tmux still seems to consider the entire screen as one pane though - when I press Ctrl+b q, the pane number ('0') appears in the middle of the screen. Any ideas on what the issue is (I'm not sure if it's tmux or vim)?

share|improve this question
    
Weird. What is the value of $ echo $COLUMNS outside and inside of tmux and the value of :echo &columns in Vim? Also what is the value of $ echo $TERM in and outside of tmux? –  romainl Apr 20 '13 at 11:34
    
Outside tmux: 202 (columns) xterm-256color –  user977588 Apr 21 '13 at 22:17
    
Inside tmux: 202 (columns) screen. And inside vim, :echo columns returns 100 –  user977588 Apr 21 '13 at 22:18
    
I don't know why, but I think I found a fix by putting set term=xterm into my .vimrc. Thank you for the clue! –  user977588 Apr 21 '13 at 22:25
    
The recommended TERM setting for tmux is screen-256color. Add this line to ~/.tmux.conf: set -g default-terminal "screen-256color". –  romainl Apr 22 '13 at 5:00

1 Answer 1

As @user977588 suggests, the fix here is to add:

set term=xterm

... to .vimrc.

EDIT: if you wish to retain syntax coloring, instead use:

set term=xterm-256color
share|improve this answer
    
Thank you! Got it working now. –  user977588 May 17 at 16:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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