0

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)?

5
  • 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, 2013 at 11:34
  • Outside tmux: 202 (columns) xterm-256color
    – user977588
    Apr 21, 2013 at 22:17
  • Inside tmux: 202 (columns) screen. And inside vim, :echo columns returns 100
    – user977588
    Apr 21, 2013 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, 2013 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, 2013 at 5:00

2 Answers 2

0

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
0
0

Ran into this problem today. The above answer didn't work. I had to add these lines in my .vimrc to fix (adjust to your screen size):

set lines=52
set columns=211

You must log in to answer this question.

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