The last Vim color scheme you'll ever need

Vim Logo
Color Scheme

This color scheme is based off of my popular IR_Black theme for TextMate.

When thinking of vim or vi, visually appealing UI doesn't normally enter your mind. But that isn't due to a lack of features, because its support for syntax coloring is one the best I've seen; the only thing slightly better is TextMate. It's due to the poor color schemes many people use.

In gVim or MacVim you have access to all colors, and in the shell you have access to the 16 ANSI colors (well at least in my 16 color terminal, you can have up to 256 colors in some terminals).

Examples

All the following examples use the Monaco font.

Ruby and blank file - MacVim (same as gVim) - full color
Ruby example

Ruby and blank file - vim in shell - 16 colors - note: I'm using my terminal theme
Ruby example

Other Examples

 Java example

 HTML example

 Windows and popup example

Install

  • Download the color scheme
  • Place that file (ir_black.vim) in your ~/.vim/colors folder
  • Change your color scheme using :colorscheme ir_black

Note: my vimrc and gvimrc can be found here.

Share:
dzone del.icio.us digg it reddit spurl simpy blinklist furl blogmarks magnolia

  1. Jean-Francois April 30, 2008 17:07 

    I am able to load the color scheme in MacVim but doesn't work when I try to load it in console vim (v. 7.0)

    Any ideas?

  2.  April 30, 2008 18:07 Todd Werth

    Jean-Francois,
    Both are set exactly the same way:
    * Make sure you have the color scheme file in your ~/.vim/colors folder
    * Then create or modify your ~/.vim/vimrc file (startup settings go here)
    * Add these lines to it:
    set background=dark
    colorscheme ir_black
    syntax on

    Also, I'd upgrade vim if possible (I use MacPorts in OS X to do that), as 7.1.x is the current version.

  3. Jean-Francois April 30, 2008 19:11 

    Thanks for the hint!
    I also figured I needed to install the SIMBL Plugin for OSX Terminal in order to have the new ANSI colors. Works now!

    Can you share your vim settings? And maybe a few tricks like how you got the code completion working? That would make for a nice post :)

  4. Ovidiu Curcan May 01, 2008 01:33 

    I think “desert” is the best Vim color scheme, but I will give yours a go.

    I love the glossy Vim logo at the top of the article. I've never seen it before. Did you make it? And if you did, can I use it?

  5.  May 01, 2008 08:12 Todd Werth

    Ovidiu Curcan,

    The logo is MacVim's, which I slightly modified. You can find it in the git repo here:
    tinyurl.com/4x3nsm

    It's: src/MacVim/vim_gloss.icns

  6. Dan Dorman May 01, 2008 12:07 

    Beautiful work! I loves me my vim color schemes. Thanks for porting it!

  7. Costis May 03, 2008 08:21 

    Thanks very much for creating this color scheme. It's beautiful

  8. Damien May 10, 2008 19:12 

    I finally got color for certain words(syntax) but it looks nothing like the above screens.

    For example the background is not black and the font doesn't come through.

    I'm on ubuntu and have installed vim.

  9. yanokwa June 05, 2008 11:27 

    in os x, i also had to do a

    ln -s ~/.vim/vimrc ~/.vimrc

  10. ken June 13, 2008 09:20 

    nice scheme but doesn't work on linux

  11.  June 13, 2008 17:03 Todd Werth

    Ken,

    What in particular doesn't work on Linux? I assume you mean in gVim? Works fine for me in both gVim and in the shell. Do other color schemes work for you?

  12. Raghuram.O.S. June 14, 2008 02:17 

    same here... doesn work on gutsy...meaning background is white... other colorschemes wrk well...

  13.  June 14, 2008 13:32 Todd Werth

    I just double checked in Gutsy, as I was running 8.04. Works fine. I'm using gVim. If you use vim in the shell, then you need to setup your shell colors, as there is nothing a color scheme can do to change them (the appropriate colors are in the comments of the color scheme).

    Make sure your vimrc settings are correct:
    set background=dark
    syntax on
    colorscheme ir_black

    I'm glad to help, but I need more information.

  14. Tom June 14, 2008 15:17 

    Hi,

    I am running Tiger, I have installed SIMBL and TerminalColors from Mike Solomon. Everything works fine here.

    If I double click yourir_black.terminal file, it opens in TextMate, it seems Tiger doesn't recognize it as a known file.

    In vim (from shell), if I do :colorscheme ir_black, I get the following error:
    Error detected while processing ~/.vim/colors/ir_black.vim:
    line 89:
    E418: Illegal value: undercurl

    If I remove this line from the file and load it again, then a lot of characters become black on black and I can't see anything.

    Moreover I do not understand what you mean when you say that shell colors need to bet setup. How do I do that in Tiger?

  15. Tom June 14, 2008 16:22 

    Ok I finally figured it out. I had to set the colors using TerminalColors. It was my black, that was black. Setting it to dark gray made it appear correctly.

    Thank you very much for this theme that does a good job with only using the ANSI colors.

  16. Raj June 27, 2008 20:58 

    Todd, I really loved ur colorscheme, been using it for quite a few days now, n absolutely loving it.
    Thanks...appreciate ur effort

  17. Anon July 15, 2008 11:13 

    Hi,

    I really like your colorscheme... =)

    But I have a little question concerning a problem with another colorscheme...

    How can I change the red background and the yellowish color on this screenshot? www.abload.de/img/vimcolors7uq.png

    Thanks for your help.

  18.  July 21, 2008 11:00 Todd Werth

    Mr. Anon,

    I'm not sure, it isn't ErrorMsg or WarningMsg. I have nothing else set to those colors. Perhaps this happens before the colorscheme is loaded, which doesn't make a lot of sense, but possible.

  19. senojobmij August 11, 2008 13:22 

    Hey,

    I really like the color scheme, thanks.

  20. Christian Pearce August 26, 2008 11:06 

    Thanks for the color scheme. That made my month.

  21. Ovidiu Curcan September 01, 2008 12:00 

    I use Ubuntu Hardy and I can confirm that it does work.

    The one thing that I do not like about the scheme is that NonText is practically invisible (#070707 on black). I had to change it to grey20 on grey10 (I like that for extends and precedes listchars). Other than that, really nice.

  22. Brandon September 19, 2008 13:20 

    Is it possible to use this with iTerm on the Mac? I have to use iTerm for work (don't ask), even though I rather use terminal.

  23.  September 20, 2008 15:54 Todd Werth

    Brandon, I assume you're talking about the terminal colors and not vim's colors. If so, no, not directly, but you can create your own profile in iTerm and set the colors. Here they are:

    Colors Bright Colors
    Black #4E4E4E #7C7C7C
    Red #FF6C60 #FFB6B0
    Green #A8FF60 #CEFFAB
    Yellow #FFFFB6 #FFFFCB
    Blue #96CBFE #FFFFCB
    Magenta #FF73FD #FF9CFE
    Cyan #C6C5FE #DFDFFE
    White #EEEEEE #FFFFFF

  24. John Bender September 25, 2008 21:51 

    Any chance you would post your VIMRC?

  25.  October 07, 2008 13:52 Todd Werth

    John, I just posted them, you can find them here:

    blog.infinitered.com/entries/show/9

  26. Greg Loesch October 21, 2008 12:39 

    I can't seem to find the .vim directory ("Place that file (ir_black.vim) in your ~/.vim/colors folder")

    Can anyone be of assistance?

  27.  October 22, 2008 09:02 Todd Werth

    Greg,

    Folders that start with a dot (.vim) are hidden. Or you simply don't have a .vim folder. If you don't have one, then you can simply create it.

    If you're unfamiliar with opening hidden folders, here are two ways (this is for OS X as I see from your site that you use OS X):
    * Open it in Finder using Terminal: open ~/.vim
    * Or open it in Finder using the menu: Menu/Go/Go To Folder, then just type ~/.vim

  28. Greg Loesch October 23, 2008 21:55 

    Todd,

    Thanks for the response. I ended up figuring that part out, but now I'm confused by this step - "Change your color scheme using :colorscheme ir_black"

    Do I just enter this the same way I'd exit/quit vim? I tried this, and I did not notice any difference. I feel like I might be missing a crucial step (maybe what's provided at blog.infinitered.com/entries/show/9). I'm not understanding that at all.

    I'm obviously new to unix, so I appreciate all the help. If you wouldn't mind, could you send me the response via email (or just let me know you did respond)? Thanks!

    *votes for "subscribe to comments" feature*

  29. Tom October 28, 2008 09:20 

    Hi,

    Great job mate ;)

    I've tried this scheme on freebsd+xterm+vim7.2 combo and I did a ctrl-x and a ctrl-n for a word completion. I got a list as usual, but the selected item is hidden. Is it a feature or a bug? ;) may I missed an important settings? My terminal support the 256 colors and everything else is fine.

    Tom

  30. Dustin December 10, 2008 23:55 

    Thanks for the color scheme; I've really been enjoying it.

  31. hone December 21, 2008 16:03 

    to get the popup to display correctly in xterm, you have to override the cterm settings next to PmenuSel. This is what I changed mine to:

    hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=white ctermbg=darkgray cterm=NONE
    hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=black ctermbg=lightgreen cterm=NONE

  32. guest November 25, 2008 07:18 

    Change your color scheme using :colorscheme ir_black

    when I enter colorscheme ir_black,
    it shows the error:

    -bash :colorscheme : command not found.

    How to deal with this?
    Thanks.

  33. Michael November 25, 2008 20:46 

    Thanks for the scheme.

    On my version I backed off the white foreground Elements as it was a bit too contrasty particularily ALLCAPS keyword sections were relatively difficult to refocus on.

  34. Jason February 11, 2009 08:34 

    I have tried others, but I cannot find any color scheme I like more than this, for both Terminal and for vim.

    The most important thing I've found that I like is the darkish-gray comments on the black background. I put a lot of comments in my code, and I can now just move my head back from the screen and the comments kind of fade away, allowing me to see the working code with ease. I'm trying to convert others in my office to the dark gray comments (or light gray on a white background) but so far, no takers. I think they're nuts, they think I'm nuts! :-)

  35. alvar February 12, 2009 12:21 

    I am having the same problem as a previous commentor. Not sure where vim searches for colorscheme files. I put your in ~/.vim/colors/ but got the following error

    Error detected while processing /Users/alvar/.vimrc:
    line 11:
    E185: Cannot find color scheme ir_black

    note that my I have ~/.vimrc, not ~/.vim/vimrc

    thanks for sharing!

  36. alvar February 12, 2009 12:21 

    I am having the same problem as a previous commentor. Not sure where vim searches for colorscheme files. I put your in ~/.vim/colors/ but got the following error

    Error detected while processing /Users/alvar/.vimrc:
    line 11:
    E185: Cannot find color scheme ir_black

    note that my I have ~/.vimrc, not ~/.vim/vimrc

    thanks for sharing!

  37. Maroloccio December 12, 2008 12:17 

    I like this colour scheme! You'll notice is somewhat like mine (www.vim.org/scripts/script.php?script_id=2480) but in some ways subtler... I particularly like the visual highlighting... I will try it for a while! Thanks for featuring it!

  38. amit April 22, 2009 10:06 

    Thanks Todd for a fantastic color scheme !!
    I use it on my shell vim 7.1 version, although it does not match exactly the same experience you get in gVim (as my shell does not have the colors defined), it is still very good for syntax highlighting for html, css, js and java files

  39. A Chess April 29, 2009 20:55 

    The colorscheme is really nice!
    I'm using iterm and i set the colors (for the profile) as you suggested, but the popup has a problem. The selected item is exactly the same color as the background and not the nice green you've shown in the screenshot. Any ideas how/why?

  40. phipster April 29, 2009 22:24 

    Great theme! Thanks for sharing.

  41. Giles Bowkett May 14, 2009 12:37 

    This is beautiful but it obscures my line numbers. Weirdly there's a line which begins "hi LineNr". I deleted this line and it didn't affect the line numbers at all. I'm also seeing all my comments disappear when I enable the color scheme. Weirder still, I was able to solve the disappearing line numbers problem by commenting out the first four "hi FooBar" lines, i.e., from "hi Normal" to "hi LineNr" but not by commenting out any one specific line. Commenting out the "hi Comment" line solved the comments problem, however. All told this was about five minutes of fiddling, and the results are gorgeous, so thanks for this awesome color scheme. :-)

  42. OwenK May 25, 2009 21:07 

    Great color scheme, but vimdiff is unreadable. Any fixes?

  43. Aaron June 03, 2009 08:49 

    Awesome theme! Is absolutely beautiful with iTerm + CSApprox. Finally I can put away TextMate :)

  44. Jason July 29, 2009 13:17 

    I agree that vimdiff is painful to use with this color scheme. My colors vary slightly (I made them slightly more pale in Terminal.app preferences) and I can use it OK, but it's certainly not elegant.

    But, has anyone ever seen a nice, elegant vimdiff color scheme? All the ones I've ever seen look pretty garish.

  45. A August 02, 2009 10:26 

    This color seems like a copy of the wombat color theme

  46. Daniel Baucom August 08, 2009 23:08 

    I added the following three lines to the if vim 7 section after hi search, it adds matching coloring to vim tabs:

    hi TabLineSel guifg=green guibg=darkgray gui=NONE ctermfg=green ctermbg=darkgray cterm=NONE
    hi TabLineFill guifg=darkgray guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=underline
    hi TabLine guifg=darkgray guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=underline

    you might consider adding this or not :-)

  47. adrusi August 25, 2009 11:47 

    what plugins are you using to get the windows and popups example

  48.  August 25, 2009 22:35 Todd Werth

    Adrusi, those aren't plugins, vim supports windows (vertical and horizontal), and that's omni completion

  49. Antti October 09, 2009 12:57 

    A beautiful scheme!

    I found some things less than perfect for my use and did some modifications for myself:

    Type (#ffffb8) didn't stand out enough from white text, so I made it more yellow:

    hi Type guifg=#FFFF98 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE

    I use 'list' to show tab characters, so SpecialKey with nonblack background stood out too much:

    hi SpecialKey guifg=#808080 guibg=#000000 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE

    Finally, I didn't like the black text non-current status windows and made the background a bit lighter as well:

    hi VertSplit guifg=#202020 guibg=#404040 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE
    hi StatusLine guifg=#dddddd guibg=#404040 gui=italic ctermfg=white ctermbg=darkgray cterm=NONE
    hi StatusLineNC guifg=#777777 guibg=#404040 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE

    With this modifications, I'm happier than ever. Thanks for sharing!

  50. anon November 14, 2009 13:32 

    @Jean-Francois

    Thanks for the background=dark tip, a bunch of my text was black (on a black terminal) so I was like, the fuck is with this theme? I can't see shit!

  51. mimosinnet November 28, 2009 03:04 

    I just discovered the theme and looks excellent in a transparent console with a dark background. Thanks!

  52. M.Kannan December 23, 2009 22:37 

    This is wonderful man... good i love this scheme. After all i found a good colour scheme for vim.. :)

  53. umesh January 19, 2010 21:08 

    Thanks for the info. But my .vimrc works only when i set the colorscheme as "astronaut". Other color schemes doesnt work for me including yours. I use AIX and putty. Do i need to make any changes anywhere? My terminal is xterm. Please help me on this.

  54. umesh January 19, 2010 21:15 

    Great.. I got it... I should have changed my putty settings...The "Terminal-type-string" should be "iterm" instead of xterm. This solved my issue.

  55. umesh January 19, 2010 22:40 

    Great.. I got it... I should have changed my putty settings...The "Terminal-type-string" should be "iterm" instead of xterm. This solved my issue.

  56. umesh January 20, 2010 06:55 

    Great.. I got it... I should have changed my putty settings...The "Terminal-type-string" should be "iterm" instead of xterm. This solved my issue.

  57. umesh January 20, 2010 11:50 

    Great.. I got it... I should have changed my putty settings...The "Terminal-type-string" should be "iterm" instead of xterm. This solved my issue.

  58. ccheek January 22, 2010 14:56 

    For those having issues setting up the gvim colorscheme on windows, if you read the docs you'll see this:
    Config file: _gvimrc
    Path: $HOME/_gvimrc

    My config file is here:
    C:\Documents and Settings\ccheek

    This is the line I need to add to the _gvimrc file:
    colorscheme ir_black

    Pretty simple stuff O_o.

  59. Maarten Bremer January 27, 2010 17:14 

    When you use Putty you should the install ncurses-term package, and add "export TERM=xterm-256color" to your profile to get the needed 256 instead of the standard 8 colors.

Leave a new comment:     = Required


(will not be shown)