13

I installed You Complete Me with the help of Vundle in vim. The first time I used it, the suggested words were completely unreadable. They had a dark purple background and a black font color. Then I saw this post on quora and changed my .vimrc now. My .vimrc looks like this at the moment.

set tabstop=2
highlight Comment ctermfg=lightblue
highlight Pmenu ctermfg=2 ctermbg=3 guifg=#ffffff guibg=#000000

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()

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

Plugin 'Valloric/YouCompleteMe'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

Unfortunately the suggested words are display like this

enter image description here

I can't read that very well and would like to change it but don't know how. I thought that my current settings would give me white foreground and black background.

After installing this Plugin I also have 4 instead of 2 indents.. I already tried this, but it didn't serve me. How can I change this?

Community
  • 1
  • 1
ZedsWhatSheSaid
  • 467
  • 2
  • 9
  • 23

2 Answers2

21

You are editing the settings for the GUI not for the command line.

highlight Pmenu ctermfg=15 ctermbg=0 guifg=#ffffff guibg=#000000

This would give you a black background and a white foreground in both gvim and the command line.

Color chart for vim colors

Edit: corrected spelling

iphipps
  • 529
  • 1
  • 7
  • 20
goesnowhere
  • 211
  • 1
  • 3
6

You've just changed the definition of Pmenu, the highlighting of normal items. There's also PmenuSel for the selected item, which I suspect is what's on your screenshot. (There are even more, check :help hl-Pmenu for the complete list.

Also, note that for those settings to be effective, they must come after any :colorscheme command. I didn't see such in your posted ~/.vimrc, so choosing a different colorscheme (some ship with Vim, many more can be downloaded from vim.org or elsewhere) might be an alternative to tweaking all these colors yourself.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • As long as you don't dynamically switch colorschemes, just put the `:hi ...` commands below the line that selects the `:colorscheme` in your .vimrc. If you'd like to switch colorschemes on the fly, you additionally need to execute the `:hi` command(s) via `:autocmd ColorScheme * hi ...`, too. – Ingo Karkat Apr 14 '15 at 14:26