Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Vim colors not showing in tmux

I have not been able to use vim in tmux for about a week now. I keep all of my dotfiles in Github (here https://github.com/jordanjones98/dotfiles) and when I got a computer I thought it would be an easy git pull, and some other simple setup. When I pulled, and installed my plugins everything works outside of tmux, but not inside. I am using vim 8.0 and tmux 2.6. I am using a zsh shell inside of iTerm.

It is worth noting that this same configuration worked on my old computer, and works on my current work computer. I even copied the iTerm configuration from my work computer to try and get this working.

A few things I have tried..
running tmux -2
running TERM=screen-256color-bce tmux
setting set -g default-terminal "screen-256color" in my .tmux.conf
setting "report terminal type" to xterm-256color in my iterm preferences.

I have also tried running it in regular mac terminal and once again vim runs fine outside of tmux, but not inside of tmux.

I have researched this for days now and have not found anything that works. I do know my .tmux.conf and .vimrc files are being loaded in tmux, because of the plugins, and bottom bar in my tmux.

My dotfiles are pretty large. So please view them here. https://github.com/jordanjones98/dotfiles

Answer*

Draft saved
Draft discarded

Required fields are marked with *

Cancel
6
  • Hi and thanks for the response, That did not work unfortunately, I updated it and put it in Github so you can view it, but I am still having the same issue. Commented Dec 27, 2017 at 19:48
  • Your tmux.conf worked for me. I'll try your dot files all together next, what OS are you on? Commented Dec 27, 2017 at 19:55
  • I am on MacOS 10.13.2 I am on this with another computer, and everything works there as well. Seems to only be this computer Commented Dec 27, 2017 at 20:09
  • I was able to repro no-colors in iterm with a fresh user account. there are bug reports out there with an ugly workaround that worked for me. I'll update my answer with the work around vimrc edit for you to try. Commented Dec 27, 2017 at 21:28
  • 1
    Thank you for the edit. That worked. May be ugly, but works for now. Thank you! Commented Dec 27, 2017 at 22:59