I had selected some really smart looking color schemes for Vim here

Following the instruction inside those files I've copied them in my $VIMRUNTIME/colors directory.

When Vim is launched in normal mode, I type :colorscheme dw_blue, and nothing happens. Same if I put this line in my .vimrc file.

In deed sometimes (with a nother custom file) not really nothing happens, if I visualize a cpp file, only the color of the #include will became gray instead of pink. But it's really all. All the color scheme remains intact (and I'm really not found of yellow and red and cyan and blue and rainbows all over my code :-))

I have tried with the files dw_cyan.vim, dw_blue.vim, dw_red.vim, dw_purple.vim, maroloccio3.vim and matrix.vim, and the problem is the same for all these files.

At first, there was a problem of end of line. So I corrected all the Dos cr-lf into Unix lineFeed with the text editor Scite. But this was blocking with a clear error in vim unknown ^M error. But there's no more error in my case: it just doesn't load the theme.

However, if I load the original theme darkblue from original Vim themes, then the theme is loaded. Same with slate, desert, 'ron' and so on...

As a solution I could try playing with the content of those files so as to achieve a theme I like, but I'd really like to know why I couldn't load the files.

I use vim73. I thought I could be because of the ATerm transparent terminal I was using, so I tried with XTerm and I got no different results.

  • 1
    All those dw_* themes you are trying are GUI-only themes. They will only work in GVim. That's one of the annoying parts of finding Vim color themes. I once went through all the ones I had and made a list of the ones that supported 16 color and 256 color terminals but I don't think I still have that list. – jw013 Dec 7 '12 at 17:59
  • so you advice me to change/modify the original vim theme that works ? you could make an answer of your comment. – Stephane Rolland Dec 7 '12 at 18:02
  • 1
    If you are working in X and do not have a serious reason to avoid gvim, you should give it a try. It functions identically, but plays nicer with mouse cut n' paste (eg, if you use line numbers or visible tabs). It (and normal vim) can also run in server mode, such than you just use "vim --remote" to send a file to an existing instance (eg, from whatever command line you happen to be on, and from gui file browsers, etc). – goldilocks Dec 7 '12 at 18:17

All those dw_* themes you are trying will only work in GVim, not in console Vim, unfortunately. For console vim, you have to limit yourself to console colorschemes. You can tell if a colorscheme supports the console by inspecting its file contents. If it only contains lines like guibg= or guifg= and does not contain anything like ctermfg= and ctermbg=, then it is GUI only. You can get a rough idea which colorschemes have console support by running grep -Fl cterm *.vim on your colorscheme files.

Another thing you can try is changing the colors of your terminal emulator. Basically, most consoles have a limited palette of colors to work with. Most have at least 8, some have 16, and the graphical ones typically have 256. Choosing a Vim colorscheme is choosing how you want to arrange the colors within the palette you have. Changing the palette itself will obviously affect all applications that run in that terminal, so proceed carefully. Gnome-terminal has this option in its settings menu. XTerm can be configured via Xresources.

  • 2
    Keep in mind that expanding the palette of the terminal emulator won't change the fact that non-gui vim will still ignore guibg=, etc. This would be true even if the terminal had millions of colors available. – goldilocks Dec 7 '12 at 18:11
  • I use ATerm so as to have pseudo transparency at a low price, I don't want to lose it for gnome terminals. – Stephane Rolland Dec 7 '12 at 18:12
  • @StephaneRolland Aterm colors can be configured via Xresources as well. Try to find a colorscheme first - I'd only recommend changing the terminal colors if you are unhappy with them (for all purposes). For example I changed mine b/c the blue color was hard to read on a dark background. Slightly off-topic, but I've never found pseudo-transparency useful - tried it with rxvt, but turned it off eventually b/c it impaired legibility. – jw013 Dec 7 '12 at 18:18
  • Nice to know rxvt implements it also, i'm gonna try it too. I use dark-black-grey backgrounds so as not to lose readability. – Stephane Rolland Dec 7 '12 at 18:21
  • 1
    guicolorscheme (github.com/vim-scripts/guicolorscheme.vim) can translate gui color schemes into cterm color codes, I used it to construct an initial color scheme based on an existing gui colorscheme and then tweak it like you did. – steabert Mar 2 '14 at 14:05

I had the same problem using Gvim74: the standard colorschemes worked, newly downloaded ones did not. In my case the problem was that I copied the colorscheme as root, and normal users did not have read permissions. Giving read permissions solved my problem.


Running infocmp $TERM | grep colors will tell you how many colors your terminal supports (in my case the console reports TERM=linux and 8 colors).

In vim you can :set t_Co=256 to "upgrade" the colors without changing the terminal information and then load the theme with :colo whatever.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.