vim: E185: Cannot find color scheme blue etc... hunh?

I’ve been using vim for a long time now. I don’t consider myself an expert vim user however as I pretty much only know the features I use, And not a few of the nice touches in the .vimrc I drag around with me came from the code written{by far smarter brains than mine} into the system default .vimrc files from some of the assorted distros I’ve installed over the years. That is to say that I’ve lerned to use features that I don’t really understand.

One of these has been the :colorscheme command.

Once I discovered that it existed It occured to me that it could be useful to be able to tell at a glance {when returning to an editing task after doing something else for a while} which {if any} of my key{:map}ped formating presets is currently invoked by associating them with different color schemes.

It also comes in handy to be able to change the color scheme on the fly if/when syntax highlighting combined with poorly chosen terminal (xterm/konsole/etc…) color setting makes some of the text hard to read…

But when I got around to installing my personal .vimrc on my new OpenSuSE installation, attempting to use any of these:

":map _ :colorscheme blue^M:set noai number nowrap textwidth=0 noignorecase ^M
":map + :colorscheme darkblue^M:set ai nonumber wrap textwidth=95 ignorecase^M
":map = :colorscheme murphy^M:set ai nonumber wrap textwidth=75 noignorecase^M
":map - :colorscheme torte^M:set ai nonumber wrap textwidth=65 ignorecase^M

Only results in “E185: Cannot find color scheme blue” {or darkblue or …}

Now when I look at the assorted vim packages available on OpenSuSE I found it a little bit bewildering. That is to say I’m not used to finding so many vim “plugins” . But I thought I found one that would solve the problem…

linux-i4r5:~ # zypper se vim|grep '^i'
i | vim                       | Vi IMproved                                                         | package
i | vim-base                  | Vi IMproved                                                         | package
i | vim-enhanced              | A version of the VIM editor which includes recent enhancements      | package
i | vim-plugin-colorschemes   | Vim color schemes selection                                         | package
linux-i4r5:~ #   


But it didn’t. What am I missing???

I will note only that a check in Yast software management shows that I have “vim”, “vim-base” and “vim-data” installed. So those are presumably part of a standard install.

I can’t help you with the color problem. I always delete “/etc/vimrc” because I don’t like the coloring that it sets. I want it to behave like plain old-fashioned “vi”.

That sounds about right to me… Whereas, depending on the distro, the package that gets you all the bells an whistles on the console {or in an xterm} is usually called vim-enhanced or vim-full. At least that’s what I’ve found…

When I first noticed colorschemes weren’t working I did a

zypper se vim

which led to my discovering a package named vim-plugin-colorschemes which I figured was supposed to add colorschemes to vim…

Turns out it did. After much googling and file browsing I found that the directory “/usr/share/vim/vim73/colors” was empty… Whereas “/usr/share/vim/site/colors” contained 101 color scheme files. But it did not duplicate the filenames that should have been in /usr/share/vim/vim73/colors.

I checked and at least some of the 101 colorscheme files do work. I then mounted the root partition of another installed distro and did a

cp /mnt/usr/share/vim/vim73/colors/* /usr/share/vim/vim73/colors/

And copied the missing 17 original colorschemes back to where they should have been, and suddenly my colorscheme laden vimrc began working properly… Go figure! Gosh I hope I didn’t just violate the terms of some license…

I can’t help you with the color problem. I always delete “/etc/vimrc” because I don’t like the coloring that it sets. I want it to behave like plain old-fashioned “vi”.

I could be remembering wrong But I think that vim will start in a “vi” compatibility mode by either calling it as vi or if it finds an ~/.exrc but no ~/.vimrc initialization file.

Well, I call it “vi”, I have “~/.exrc” and I don’t have “~/.vimrc”. And it starts with annoying colors unless I remove “/etc/vimrc”. That is to say, I find the colors annoying.

Hi
Just create a ~/.vimrc with syntax off in it…?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 4 days 9:50, 3 users, load average: 0.28, 0.12, 0.07
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

I gathered that… And while I usualy like that feature, there are a number of things that are alledgedly improvements over older versions that I find annoying. So I feel your pain. If zapping /etc/vimrc works for you. Then good!

Still you may want to considder malcolmlewis’s solution…

Do you suppose he could just put that in his existing ~/.exrc instead???

Hi
Don’t see why not;


ls -la /usr/bin/ex

lrwxrwxrwx 1 root root 3 Aug 24 14:45 /usr/bin/ex -> vim


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 2:32, 3 users, load average: 0.48, 0.55, 0.50
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU