Friday, July 11, 2008

Color schemes with vifm

This has been a "tools" day. I use vim for my IDE, but after 13 years of using still don't consider myself an expert. I've been using vimmate (in Ruby) for accessing the files and directories in my Catalyst project, but decided to find some option to recover the screen real estate. I ran across vifm, an ncurses vi-like file manager, which does pretty much what I want. However it comes with a dark background and I only do light backgrounds. The code has the ability to use a file of "colorschemes", but there is no documentation or example. I read the C code and figured out how to create a light background colorschemes file. vifm uses a ~/.vifm directory for configuration. In that directory, create a "colorschemes" file (no extension). The goal with the colorschemes was apparently to have different colors for different types of directories, as you can see in the screen shot at http://vifm.sourceforge.net/picture.html, but I just wanted a different default setup. In the "colorschemes" file I have the following:
COLORSCHEME=Default
COLOR=MENU=4=7
COLOR=BORDER=7=0
COLOR=WIN=0=7
COLOR=STATUS_BAR=0=7
COLOR=CURR_LINE=7=4
COLOR=DIRECTORY=4=7
COLOR=LINK=4=7
COLOR=SOCKET=4=7
COLOR=DEVICE=1=7
COLOR=EXECUTABLE=2=7
COLOR=SELECTED=5=0
COLOR=CURRENT=7=0
This is not completely tested but seems to be working so far. If you want a different colorscheme for a different directory, you would add a line such as: DIRECTORY=/Full/Path/To/Base/Directory after the COLORSCHEME line. Comments start with # G.Shank

No comments: