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.
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.
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.
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.
10 comments:
This is cool. I installed cream on my suse box and I have already started liking it. It is so userfriendly like using notepad or gedit but much more powerful. You wouldn't know you are actually working in Vim unless some one points it out.
Thanks for the post.
e@zyvg,
Cream is not an editor. It is a collection of scripts and plugins which reconfigures GVim to make it userfriendly to newbies. So by using cream, you are actually using the same Gvim.
It is similar to applying skins to media players to make it look different.
I have been using Cream for VIM for almost a year, and it's the only editor I use for all tasks (unless I want to preview a quick file in the terminal, I use nano).
TIP: Use Cream in Expert mode. This allows you to use Cream as a regular editor with all normal text editor commands and be able to press ESC and return to normal mode. This enables you to still have all of the power of VIM at your fingertips.
It may sound crazy, but VIM is my favorite application. You can't do nothing but respect the power contained in one application.
i m trying to use gvim to write fiction. how can i make stop at 70 characters. been a vi fan for years never figured this part out though. your article was cool, already installed cream trying to find out how to get paragraphs and stuff organized though.
@anonymous 4:54 AM
I guess in cream you can navigate to "Settings > Auto Warp" and toggle it on. Then just below the auto warp entry, you have another called "Set warp width" which you click and enter the value (in your case 70). And the text will be auto warped after 70 characters.
@anonymous 8:49 PM
I totally agree with you. Vim rocks. It is also my favourate editor. I have been using it for all sorts of editing tasks including writing code. And the fact that some people have been able to enhance vim to bring it down to a normal editor without sacrificing its power speaks volumes about its flexibility and versatility.
:set tw=70
"providing the same key bindings found in editors in Windows for the most common tasks"
Note that the key bindings and menus used in Cream did not originate with Windows, but with the CUA standard from IBM -- both Windows and Cream just happen to use the same IBM standard. (In fact it would be a whole lot easier if all applications did likewise -- it certainly makes things easier for users!). See the wikipedia article on common user access.
Does anyone know how to integrate Woc-Vim into Cream?
Once this is done, will I be able to have URLs in plain text files and click them to open the link in my browser?
Thanks
Awesome blog and great information posted. Even i had no idea of cream thanks for updating.
Post a Comment