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)?
2 Answers
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
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
$ 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?set term=xterm
into my .vimrc. Thank you for the clue!TERM
setting for tmux isscreen-256color
. Add this line to~/.tmux.conf
:set -g default-terminal "screen-256color"
.