user-avatar
Today is Friday
November 22, 2024

Tag: scheme

July 23, 2009

how to add different vim color schemes

by viggy — Categories: Uncategorized — Tags: , , , 1 Comment

If you do any significant amount of text editing in vi, you could benefit from syntax highlighting. Turning on syntax highlighting in Vi (or VIM rather) is as simple as adding
set nocompatible and syntax on to your ~/.vimrc file. While you are editing your .vimrc file, there are a ton of other cool things you can tweak which I recommend as well (ex. tabstop, nowrap, ignorecase, bs, etc). Once you have syntax highlighting on, you may decide you want a different color scheme. This is also simple.

You can put color scheme definition files in the ~/.vim/colors/ directory. The files will have a “vim” extension. You can load a color scheme by typing :colors [scheme_name] while in vi. In most OS installs there are a ton of schemes included, in OS X these are in “/usr/share/vim/vim62/colors/”. Included for me are: darkblue, desert, elflord, evening, koehler, morning, murphy, pablo, peachpuff, ron, shine, shine, torte, and zellner. If none of these tickle your fancy, there are a bunch available here or you could always build your own.

You may also add any color schemes that you got from internet. To do that, obtain the file from internet, it must be a .vim extension file. Check out which is your VIM’s home directory. You can get it by executing the following in vim “:echo $home”. Go to that directory. You will find a “colors” directory. Add your .vim extension file in it. Also then make the necessary changes in .vimrc file also.

Courtsey: http://nosheep.net/story/vi-color-schemes/