Cream for Vim - Making Vim more user friendly

Learning to use Vi editor could be a real pain for most people as it has a relatively steep learning curve. But once the most common commands are mastered, one gets to enjoy the sheer power of this editor made available at ones finger tips. And there are an ever growing group of Vi enthusiasts around (myself included) who swear by it over other text editors. The modern avatar of Vi is Vim (VI iMproved) created by Bram Moolenaar and released as an open source software package. VIM is an excellent vi clone with a slew of additional features and which can be further enhanced and modified using scripts. On last count there are 1557 scripts available at the Vim.org website which enhances the editor for a variety of uses.

Fig: This article displayed in Cream editor

One project which has gained a lot of popularity in the Vim community is Cream. Cream consists of a collection of scripts and plug-ins which aims to make it much more easier for a new user to cut his teeth in Vim and the user can easily use most of the features of Vim which has made it the popular editor it is by just navigating the menu. All it takes to install Cream in Debian based distributions is to run the command :
# apt-get install cream
... which will install the collection of scripts in the necessary places as well as provide an entry in the Gnome Applications Menu. The only requisite is that you should already have GVim installed on your machine. Once Cream is installed, one can double click the menu entry in the Gnome Applications menu and GVim is started with the Cream scripts in place. At this point one might ask what is unique about this project ? Well for one, this redesigns GVim to bring the same ease of use of any ordinary text editor (read kate, kwrite, nano ...) where the user need not be bothered by the different Vi command modes; rather he/she can just start typing. Secondly, it brings a whole lot of power to the user by providing menu entries for most of the special things one can achieve in GVim. Take for instance creating folds in ones text. In GVim, one does it by pressing the key combination "v}zf" in the command mode. And a new user who is trying Vi will in most cases be ignorant about this. Cream has a menu entry for folding the paragraphs in ones text and all it takes is to just select the paragraph which has to be folded and press F9 or click on the menu Tools --> Folding --> Set fold (selection). And voila! a fold is created. But this is only a small part of the features provided by Cream.

Fig: One can create folds in Cream with ease

The developers of Cream have given it a great deal of attention in providing the same key bindings found in editors in Windows for the most common tasks like cut/copy/paste , undo/redo, open/close a file and so on. For example, to undo the most recent changes, one can press Ctrl+Z instead of the usual way of moving into command mode by pressing 'Esc' and then pressing 'u'. By remapping the shortcuts, the developers of Cream have considerably reduced the learning curve to make it almost negligible.

Another thing which I found really useful is the "Settings" menu which contains options for setting various parameters like the tabstop width, toggling auto-indent and setting the preferences like the font used, bracket flashing and so on. But what is to be noted is that the settings that are changed are automatically made permanent until the user changes them again.

This is different in the original GVim in that the changed settings apply only to that instance of the editor and in-order to make the settings permanent, you have to save them in the gvimrc configuration file residing in the /etc/vim/ directory.
Fig: Calendar plugin

Cream also installs a few additional plugins along with it. One which took my fancy is the calendar plugin which embeds a calendar inside the editor. And one can view the calendar by pressing Ctrl + F11. Why just a calendar... there is also a game called typing tutor which can be played inside the editor to while away ones time and improve ones typing speed at the same time. All in all, this is a very interesting project which reconfigures the Vim editor to make it as easy to use as an ordinary text editor without sacrificing any of its underlying power.

 
 
 
 
Copyright © Sun solaris admin