Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: "E185: Cannot find color scheme solarized"

Setting up a new machine and trying to get Solarized running in Vim. Getting the following error when I run vim:

E185: Cannot find color scheme solarized

Tried to follow Pathogen install instructions from the Solarized README on the official repo. Checked this similar question & answer, which solved the problem by actually having the proper files in the directory, but as you can see below, my directory is indeed full of goodies (I just cloned it).

Details

  • iTerm2
  • .vimrc is loading, and other plugins are working
  • Tried to manually install Solarized also (by moving solarized.vim into .vim/colors), but got the same error

.vimrc

32 syntax enable  
33 " colo wombat  
34  
35 """ Solarized """  
36 let g:solarized_termcolors=256  
37 set background=dark  
38 colorscheme solarized  

.vim directory

├── autoload  
│   └── pathogen.vim  
├── bundle  
│   ├── ctrlp.vim  
│   │   ├── autoload  
│   │   │   ├── ctrlp  
│   │   │   │   ├── bookmarkdir.vim  
│   │   │   │   ├── buffertag.vim  
│   │   │   │   ├── changes.vim  
│   │   │   │   ├── dir.vim  
│   │   │   │   ├── line.vim  
│   │   │   │   ├── mixed.vim  
│   │   │   │   ├── mrufiles.vim  
│   │   │   │   ├── quickfix.vim  
│   │   │   │   ├── rtscript.vim  
│   │   │   │   ├── tag.vim  
│   │   │   │   ├── undo.vim  
│   │   │   │   └── utils.vim  
│   │   │   └── ctrlp.vim  
│   │   ├── doc  
│   │   │   ├── ctrlp.txt  
│   │   │   └── tags  
│   │   ├── plugin  
│   │   │   └── ctrlp.vim  
│   │   └── readme.md  
│   ├── supertab  
│   │   ├── Makefile  
│   │   ├── README.rst  
│   │   ├── doc  
│   │   │   ├── supertab.txt  
│   │   │   └── tags  
│   │   └── plugin  
│   │       └── supertab.vim  
│   ├── vim-colors-solarized  
│   │   ├── README.mkd  
│   │   ├── autoload  
│   │   │   └── togglebg.vim  
│   │   ├── bitmaps  
│   │   │   └── togglebg.png  
│   │   ├── colors  
│   │   │   └── solarized.vim  
│   │   └── doc  
│   │       ├── solarized.txt  
│   │       └── tags  
│   ├── vim-jade  
│   └── vim-surround  
│       ├── README.markdown  
│       ├── doc  
│       │   ├── surround.txt  
│       │   └── tags  
│       └── plugin  
│           └── surround.vim  
└── colors  
    └── wombat.vim  
like image 958
Brian Dant Avatar asked Mar 09 '13 15:03

Brian Dant


People also ask

How do I enable color scheme in vim?

You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.

Where does vim look for color schemes?

Vim color schemes are stored in vim directory named /usr/share/vim/vim80/colors/ but vim80 can be different according to vim version.

How do I change colors in vim?

After typing the command, press “Tab”. This will open a list of all the available color schemes. If you keep pressing “Tab”, Vim will cycle through all of them.

What does/usr/share/Vim/vimrc error E185 mean?

Error detected while processing /usr/share/vim/vimrc: line 42: E185: Cannot find color scheme 'solarized.vim' Actually, the color scheme is still running despite this error message. there is below the arborescence and the .vimrc file.

Is the color scheme still running Despite this error message?

Actually, the color scheme is still running despite this error message. there is below the arborescence and the .vimrc file.

Where does colorscheme solarized go in Vundle?

With the new version of vundle (Vundle.vim), it appears as though colorscheme solarized must come somewhere after call vundle#end (). Sorry, something went wrong. @wimplash that was it! moved it after vundle#end () and it worked for me


1 Answers

I ran into the same issue with Gnome Terminal (although gvim would work fine), and these were the lines I had to add to my .vimrc:

se t_Co=16
let g:solarized_termcolors=256  
set background=dark  
colorscheme solarized

Setting se t_co=256 without let g:solarized_termcolors=256, will also show colors, but not the right one as per the colorscheme, since it reverts to fallback mode with 256 colors.

This is similar to Mike's suggestion.

like image 98
Tuxdude Avatar answered Sep 20 '22 23:09

Tuxdude