1

When using Vim on its own with Vundle and Airline the theme appears normally:

enter image description here

When I have loaded it up in Tmuxline, the theme uses different colors and even Vim looks different:

enter image description here

enter image description here

Here's my Tmux configuration:

set -g default-terminal "screen-256color"

source-file /home/tk/.tmux/tmuxline

unbind C-b

set -g prefix C-o

bind | split-window -h
bind - split-window -v

set-window-option -g mode-keys vi

bind-key -t vi-copy 'v' begin-selection
bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'

bind C-y run "tmux save-buffer - | xclip -selection clipboard"

Here's my Vim configuration:

set nocompatible " be iMproved, required
filetype off     " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin("~/some/other/path")

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'bling/vim-airline'

Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'

Bundle 'edkolev/tmuxline.vim'

" include plugins here

call vundle#end()
filetype plugin indent on

set backspace=indent,eol,start

set showcmd
set incsearch
set number
set expandtab
set tabstop=4
set shiftwidth=4
set hlsearch
set ic
set autoindent
set cmdheight=1
set laststatus=2

syntax enable

set nobackup
set noswapfile
set showmatch

" airline
let g:airline_powerline_fonts = 1
let g:airline_theme = 'kolor'

set t_Co=256

Obviously, my colors are screwed up somewhere along the line. How do I fix this?

3
  • Your issue makes me think of this one i.e. the interplay between terminal settings and tmux.
    – user44370
    Commented Sep 5, 2014 at 19:54
  • Does tmux change the $TERM env. variable?
    – slm
    Commented Sep 5, 2014 at 21:21
  • Did you resolve this issue?
    – Egel
    Commented Jun 6, 2015 at 12:32

1 Answer 1

2

You can use tmux -2 to solve this issue.

2
  • 1
    Could you add to your answer, an explaination why the tmux config line `set -g default-terminal "screen-256color"`` doesn't do the same as your answer, thank you.
    – X Tian
    Commented Aug 19, 2015 at 15:13
  • @XTian In tmux manual, you can see -2 option, Force tmux to assume the terminal supports 256 colours. The set -g default-terminal option just only set terminal instead of terminal colors. Commented Apr 3, 2016 at 8:51

You must log in to answer this question.

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