Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change color settings in you complete me

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?

like image 812
ZedsWhatSheSaid Avatar asked Apr 14 '15 13:04

ZedsWhatSheSaid


2 Answers

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

like image 85
goesnowhere Avatar answered Nov 17 '22 22:11

goesnowhere


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.

like image 21
Ingo Karkat Avatar answered Nov 17 '22 21:11

Ingo Karkat