Vim colors not showing in tmux


Jordan

I have been unable to use vim in tmux for about a week. I keep all my dotfiles in Github (here https://github.com/jordanjones98/dotfiles ), when I have a computer I think it will be a simple git pull, and some other simple setting. When I pull and install the plugin, everything works outside of tmux, but not inside. I am using vim 8.0 and tmux 2.6. I use the zsh shell in iTerm.

It's worth noting that this configuration also works on my current work computer on my old computer. I even copied the iTerm configuration from my work computer to try and get it working.

A few things I've tried.. in my iterm preferences, set the "Report Terminal Type" in the .tmux.conf settings to the
run tmux -2
run TERM=screen-256color-bce tmux
setting .set -g default-terminal "screen-256color"
xterm-256color

I also tried running it in a normal mac terminal, and again vim works fine outside tmux, but not inside tmux.

I've been researching for days but haven't found anything that works. I know I'm .tmux.confin .vimrctmux when loading files, because of plugins, and in my tmux bottom bar.

My dot file is huge. So check them out here. https://github.com/jordanjones98/dotfiles

Navigation Core

I noticed that you didn't set TERM to~/.zshrc

Try this,

add

export TERM="screen-256color"

to .zshrc

instead of a bce entry - make sure to confirm source ~/.zshrcbefore starting a new tmux session

Notice. I'm using osx so my tmux.conf uses set -g default-terminal "screen-256color", if you're on linux it may be different. The problem is that this problem is usually export TERMsolved by myself .zshrc.

edit

I tried your dot file and I think I reproduce the problem. This ugly workaround made the problem go away . Before setting the color scheme, try adding the following to your ~/.vimrc file on line 44:

let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"

Related


Vim colors not showing in tmux

Jordan I have been unable to use vim in tmux for about a week. I keep all my dotfiles in Github (here https://github.com/jordanjones98/dotfiles ), when I have a computer I think it will be a simple git pull, and some other simple setting. When I pull and insta

Vim colors not showing in tmux

Jordan I have been unable to use vim in tmux for about a week. I keep all my dot files in Github (here https://github.com/jordanjones98/dotfiles ), when I have a computer I think it will be a simple git pull, and some other simple setting. When I pull and inst

tmux vim colorscheme background not showing

Thomas Browne I have tmux installed, but now the text mode vim colorschemes don't fill the background color correctly. Here's what colorscheme xoria256 looks like in a normal Ubuntu 14.10 terminal: Here, when I run it in the exact same terminal after tmux: So

tmux vim colorscheme background not showing

Thomas Browne I have tmux installed, but now the text mode vim colorschemes don't fill the background color correctly. Here's what colorscheme xoria256 looks like in a normal Ubuntu 14.10 terminal: Here, when I run it in the exact same terminal after tmux: So

256 colors support vim background in tmux

winchenton springs When using vim in tmux, I see that 256 color support is enabled. with $tput color However, changing the color scheme in vim in tmux will change the color scheme on a per-line basis instead of the entire background. see screenshot For example

Different vim colors and styles in Tmux and Gnome

Lapshin Dmitry I'm using tmuxand recently found out that the same vim color hemes inside and outside tmux have different colors On the left , plain on the right tmux, with default colors:gnome-terminalgnome-terminalgnome-terminal EDIT: Looking closer, the styl

256 colors support vim background in tmux

winchenton springs When using vim in tmux, I see that 256 color support is enabled. with $tput color However, changing the color scheme in vim in tmux will change the color scheme on a per-line basis instead of the entire background. see screenshot For example

Why do Vim colors look different inside and outside of tmux?

Rusty Shackford environment: Fedora 25(4.9.12-200.fc25.x86_64) GNOME Terminal 3.22.1 uses VTE version 0.46.1 + GNUTLS VIM-Vi IMproved 8.0 (Compiled on Sep 12, 2016, Feb 22, 2017 16:26:11) tmux 2.2 I've recently started using tmux and have observed that the col

Why do Vim colors look different inside and outside of tmux?

Rusty Shackford environment: Fedora 25(4.9.12-200.fc25.x86_64) GNOME Terminal 3.22.1 uses VTE version 0.46.1 + GNUTLS VIM-Vi IMproved 8.0 (Compiled on Sep 12, 2016, Feb 22, 2017 16:26:11) tmux 2.2 I've recently started using tmux and have observed that the col

Set colors in tmux.conf

Digital Television So I have a small ruby script that pings the CI server and returns :-) or :-( depending on whether the build passed or failed. Now, what I want to do is to show the failures in red and if they pass in green. Can you evaluate the result of th

Supports tmux, TERM and 256 colors

Atcold introduce My question comes from having to understand why I now (after many trials) why terminal and tmux support 256 colors and tput colorstell me they only have 8. background Let's start from scratch. I'm using Ubuntu set top box, Guake , tmux , Vim a

Toggle daylight colors with mint and tmux

Jeff I'm trying to find a way to easily switch between light/dark sunbathing themes without creating a new terminal/tmux session. I'm running Minty on a Windows machine, usually logging into a Linux machine and connecting to a tmux session. Using mavnn's solar

Make 256 colors work in tmux

Allocardia I have 256 colors and it works fine konsole,in . I wanted to tmuxtry it because unlike screen, it seems to support vimodes. However, I found that the color of the hint appeared, most likely because I had the hint in 256-color mode. What do I need to

Make 256 colors work in tmux

Allocardia I have 256 colors and it works fine konsole,in . I wanted to tmuxtry it because unlike screen, it seems to support vimodes. However, I found that the color of the hint appeared, most likely because I had the hint in 256-color mode. What do I need to

Set colors in tmux.conf

Digital Television So I have a small ruby script that pings the CI server and returns :-) or :-( depending on whether the build passed or failed. Now, what I want to do is to show the failures in red and if they pass in green. Can you evaluate the result of th

Supports tmux, TERM and 256 colors

Atcold introduce My question comes from having to understand why I now (after many trials) why terminal and tmux support 256 colors and tput colorstell me they only have 8. background Let's start from scratch. I'm using Ubuntu set top box, Guake , tmux , Vim a

Toggle daylight colors with mint and tmux

Jeff I'm trying to find a way to easily switch between light/dark sunbathing themes without creating a new terminal/tmux session. I'm running Minty on a Windows machine, usually logging into a Linux machine and connecting to a tmux session. Using mavnn's solar

Make 256 colors work in tmux

Allocardia I have 256 colors and it works fine konsole,in . I wanted to tmuxtry it because unlike screen, it seems to support vimodes. However, I found that the color of the hint appeared, most likely because I had the hint in 256-color mode. What do I need to

scroll with mouse in vim in tmux

aharris88 I have mouse scrolling turned on in vim and tmux, and I use iTerm 2 because it has mouse support. However, when I run vim inside tmux, I sometimes run into problems, tmux captures or steals scroll events from vim and I can scroll down in vim. That mi

tmux and vim are frozen

flash burn I just started using it tmux. Use to have a session vim. Try split buffers in swap vim. Usually I use Ctrl+++ w. Don't use this composition very often, so don't map it to anything else. For some reason my session freezes. Not sure what happened. I c

vim freeze with Cs in tmux

I am sorry I have mapped the Ctrl-s key to save the file in .vimrc. This was working fine until I just installed tmux. (Note that it worked fine because I set "stty -ixon" in my .bashrc file). How do I get the mapping to work again when opening vim from a tmux

vim freeze with Cs in tmux

I am sorry I have mapped the Ctrl-s key to save the file in .vimrc. This was working fine until I just installed tmux. (Note that it worked fine because I set "stty -ixon" in my .bashrc file). How do I get the mapping to work again when opening vim from a tmux

Vim not running in tmux

Bikin When I try to vimopen the file using the entire window , it tmuxfreezes. I have to kill windows with C-a &. Here is my ~/.vimrcsetup: :set autoindent :set ts=4 :set number :set shiftwidth=4 :set showmode :filetype on :filetype plugin on :syntax enable :s

vim combined with tmux

Nguyen Thanh Cong I would like to ask about vim + tmux. I have two files open with vim in two tmux panes. How can I copy code from vim in the first pane to the second pane. I used tmux's modal copy, but it has a number row and creates a new row. thank you for

scroll with mouse in vim in tmux

aharris88 I have mouse scrolling turned on in vim and tmux, and I use iTerm 2 because it has mouse support. However, when I run vim inside tmux, I sometimes run into problems, tmux captures or steals scroll events from vim and I can scroll down in vim. That mi

Suned in Konsole + tmux + vim

tolivera The daylight color scheme works fine when using Konsole + vim , but I don't know how to properly configure my computer to use Konsole + tmux + vim (see screenshot on the link). Below is the configuration I am using. Konsole: user:~$ echo $TERM xterm-2

tmux/vim split pane

exist I borrowed this screenshot from another question : The terminal background seems to leak into vim to the left of the divider boundary. This is most evident near Top . Can anyone tell me why/what is this and if I can get rid of it, thus clearing the divid