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 Comments on vi on a dark background

  1. Anonymous
    2007/12/10 at 12:02 AM

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

    Reply
  2. David
    2008/02/29 at 7:34 PM

    Wow, three years later, and your blog entry comes in handy. 😛

    Reply
  3. Anonymous
    2008/06/02 at 2:45 PM

    Yup, still useful. Thanks a lot :-)

    Reply
  4. Chandra SekhaR
    2008/06/19 at 4:08 AM

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

    Reply
  5. grateful
    2008/07/10 at 2:06 PM

    I love you man!
    I don’t know how could I live without that now!
    😛

    Reply
  6. Anonymous
    2008/12/17 at 6:19 PM

    Quite handy indeed, Thanks.

    Reply
  7. Anonymous
    2009/01/23 at 2:42 PM

    still helpful.

    Reply
  8. Anonymous
    2010/01/27 at 1:59 PM

    Excellent post! Thanks.

    Reply
  9. dirtyfilthy.net
    2010/02/18 at 1:17 AM

    5 years later…

    Reply
  10. Francesco
    2010/10/18 at 3:59 AM

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

    Reply
  11. Marty
    2011/02/07 at 4:23 PM

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

    Reply
  12. Mike
    2011/03/19 at 3:38 AM

    I’ll second what Marty said. Thanks!

    Reply
  13. Matt Alexander
    2011/04/12 at 10:50 AM

    The “little brighter” link is not working.

    Thanks for the post.

    Reply
  14. Kalin Mandaliev
    2011/05/13 at 5:44 AM

    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.

    Reply
  15. hiro
    2011/06/05 at 4:41 AM

    wew… six years later, helpful but how to put it in .vimrc?

    Reply
    • webvictim
      2011/06/08 at 6:57 AM

      echo “set background=dark” >> ~/.vimrc

      Reply
  16. Lynx
    2011/08/05 at 2:56 PM

    For all those lazy people out there this works too.

    set bg=dark

    Reply
  17. Laurent
    2012/10/25 at 9:07 AM

    Wow, seven years later, and your blog entry on set background=dark comes in quite handy. Thanks (a lot).

    Reply
  18. Jaime
    2012/11/28 at 1:43 PM

    ping November 2012

    Reply
  19. marc
    2013/03/07 at 4:41 AM

    yeah – eight years old blog entry and still as useful as in 2005 :)
    this ist great to read …

    Reply
  20. David
    2013/03/13 at 5:58 PM

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

    Reply
  21. Florian
    2013/10/09 at 1:55 AM

    Nice, picked some lines from it. Thanks a lot

    Reply
  22. Matt
    2014/05/06 at 11:37 PM

    Joining in with the choir, 9 years on and i got some use out of this blog entry.

    Thanks

    Reply

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=""> <s> <strike> <strong>