In vim without tmux: enter image description here

In vim with tmux: enter image description here

  • Color in Vim is 'default'
  • My .vimrc has nothing related to colors.
  • My .tmux.conf is empty.
  • My .bashrc is untouched.
  • I am using gnome-terminal with a custom color pallete.

Any help, please.


Term creates new terminals with TERM=screen-256color

Put this in your .bashrc to fix the issue

export TERM=xterm-256color

EDIT: As pointed out in the comments, you should probably run echo $TERM when you are not in tmux, then set export TERM= to whatever the output of echo was.

  • 1
    This is not 100% correct, TERM=xterm-256color would break several keys on rxvt based terminals (and a good amount of people use urxvt for example). OP should find the correct TERM setting for his terminal (the OS probably chooses a sensible one already) and only then add it to .bashrc so it will be used within tmux
    – grochmal
    Jul 13 '16 at 20:24
  • @grochmal good point, updated the answer Jul 13 '16 at 20:29

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.