vi on a dark background

I use Vim at least 100 times a day. And I like my terminals set to light on dark. Over the last 10 years or so you would find me in a dark office with a dark screen and bright text. I’ve since moved to a new office that is a little brighter but I still prefer the darker screens. With vi, the default syntax highlighting settings are too dark to actually read the text…the blue’s are almost unreadable with background glare. So, a quick search revealed an option that fixes all my problems:

set background=dark

Now my text is much brighter and still readable in the brighter office.

More: http://cephyr.cid.net/doc/vim/html/options.html#’background’

25 thoughts on “vi on a dark background”

  1. Thanks , at last I need not bend forward towards screen to read comments. Now I will be missing that excercise.

  2. Wow, five years later, and your blog entry on set background=dark comes in quite handy. Thanks.

  3. To set on Slackware vi to be color when we open files

    We need to make few steps:

    1. log as root
    2. which vim
    3. alias vi=’/usr/bin/vim’
    4. vi /usr/share/vim/vimrc
    and add this
    set background=dark, below set incsearch
    5. That’s – now you can open your files using command vi /etc/ssh/sshd_config for example and everything will be colored.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>