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

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

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 '14 at 16:42

You must log in to answer this question.

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