Archive

Posts Tagged ‘highlight’

Custom Colors

December 21, 2016 Leave a comment

Problem:
I had set up my vim to run flake8 when I save python files. The issue now was that the quickfix window would display the errors in white/white-grey text on a yellow background. That proved to be really hard to read.

white on yellow

Solution:
1. One option was to change my colorscheme to something that would display the text. (Many hours later I still had not found a colorscheme that I liked.)
2. Change the color for just that “aspect”.

So I went with option 2 and changed the color. Which resulted in black on yellow and is now much easier to read.
screen-shot-2016-12-21-at-22-13-58

Steps:
While in vim look at the current colors that are already set. (:highlight or :hi)

:highlight

highlight

The colors I wanted to change were for ‘Search’. So while still in vim

:highlight Search term=reverse ctermbg=11 ctermfg=0  guibg=Yellow

To make this permanent I added the following to .vimrc

highlight clear
highlight Search term=reverse ctermbg=11 ctermfg=0  guibg=Yellow

Source:
http://andrewradev.com/2011/08/06/making-vim-pretty-with-custom-colors/
http://superuser.com/questions/654919/how-to-turn-off-gvim-error-highlighting

Advertisements
Categories: vim Tags: