The last Vim color scheme you'll ever need
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 and blank file - vim in shell - 16 colors - note: I'm using my terminal theme

Other Examples
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.






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?
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.
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 :)
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?
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
Beautiful work! I loves me my vim color schemes. Thanks for porting it!
Thanks very much for creating this color scheme. It's beautiful
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.
in os x, i also had to do a
ln -s ~/.vim/vimrc ~/.vimrc
nice scheme but doesn't work on linux
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?
same here... doesn work on gutsy...meaning background is white... other colorschemes wrk well...
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.
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?
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.
Todd, I really loved ur colorscheme, been using it for quite a few days now, n absolutely loving it.
Thanks...appreciate ur effort
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.
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.
Hey,
I really like the color scheme, thanks.
Thanks for the color scheme. That made my month.
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.
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.
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
Any chance you would post your VIMRC?
John, I just posted them, you can find them here:
blog.infinitered.com/entries/show/9
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?
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
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*
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
Thanks for the color scheme; I've really been enjoying it.
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
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.
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.
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! :-)
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!
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!
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!
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
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?
Great theme! Thanks for sharing.
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. :-)
Great color scheme, but vimdiff is unreadable. Any fixes?
Awesome theme! Is absolutely beautiful with iTerm + CSApprox. Finally I can put away TextMate :)
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.
This color seems like a copy of the wombat color theme
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 :-)
what plugins are you using to get the windows and popups example
Adrusi, those aren't plugins, vim supports windows (vertical and horizontal), and that's omni completion
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!
@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!
I just discovered the theme and looks excellent in a transparent console with a dark background. Thanks!
This is wonderful man... good i love this scheme. After all i found a good colour scheme for vim.. :)
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.
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.
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.
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.
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.
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.
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.