1

I noticed 3 problems with my Vim terminal setup on Ubuntu which can be illustrated by the following picture of my current Vim. I get the same look with a lot of airline-themes (e.g. molokai, jellybeans, dark, etc.) current Vim

  • The first problem is that I'd like to have colors with my status bar which are clearly not appearing.
  • Also I don't know if the symbols of the status bar are correct, because the arrows do not look like the ones shown below. enter image description here
  • Finally the upper bar indicating the buffers or the tabs clearly do not look like mine.

Also, here are some potentially useful informations

  • I installed the powerline patched Mac OS font Monaco. This helped me to replace some weird symbols and get the ones shown above.
  • The only airline theme that was different was base16.
  • I tried changing the Vim colorscheme to different ones, but it didn't solve anything.

Finally here is a copy of my .vimrc

set encoding=utf8

set rtp+=~/.vim/bundle/Vundle.vim
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
call vundle#begin()

Plugin 'gmarik/Vundle.vim'
Plugin 'https://github.com/Valloric/YouCompleteMe.git'
Plugin 'https://github.com/scrooloose/nerdtree.git'
Plugin 'https://github.com/tpope/vim-surround.git'
Plugin 'https://github.com/terryma/vim-multiple-cursors.git'

Plugin 'dkprice/vim-easygrep'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'

" Optional:
Plugin 'honza/vim-snippets'

call vundle#end()

filetype plugin indent on
filetype plugin on
filetype indent on
syntax on

" air-line
let g:airline_powerline_fonts = 1

"highlight Pmenu ctermfg=15 ctermbg=4 guifg=#ffffff guibg=#0000ff

let g:ycm_show_diagnostics_ui = 1
let g:ycm_enable_diagnostic_highlighting = 0
set number
set autochdir
set ruler
set ts=4
set expandtab
set shiftwidth=4
set cursorline
set showmatch
set ignorecase
set showcmd
set list listchars=tab:\ \ ,trail:·
" set timeoutlen = 200
set nofoldenable
set wildmode=full
set laststatus=2
set completeopt-=preview

map <Tab> <C-W>W
nnoremap <F5> :NERDTreeToggle<CR>
:nmap <F3> :vimgrep //j ** <bar> copen

If more information is needed to solve these problems, I'll gladly provide it.

UPDATE: I solved the first two problems by putting 'set t_Co=256' in my .vimrc, but the upper bar is still the same is it normal?

2

I solved the first two problems by putting the set t_Co=256 in my .vimrc and solved the missing upper bar problem by putting this in my .vimrc.

let g:airline#extensions#tabline#enabled = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
  • 1
    You shouldn't set t_Co=256. Instead, set TERM=xterm-256color (or if using screen/tmux, TERM=screen-256color) in your shell initialization files. – muru Apr 21 '16 at 22:20
  • The contributor said: "vim should detect this value automatically, but only if you have your terminal set up properly". Setting your terminal up properly is having TERM=xterm-256color. Having done that, Vim will detect that t_Co should be 256. It's if you have TERM supporting 256 colors and Vim doesn't detect it that you have to use this override. – muru Apr 22 '16 at 1:53
  • @muru Will try that, but why shouldn't I set it as it is suggested here to enable 256 colors in Vim? – pandaman1234 Apr 22 '16 at 1:55

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.