This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!


Review: vile editor is anything but

By Mayank Sharma on January 31, 2006 (8:00:00 AM)

Share    Print    Comments   

If you code or play with configuration files in Linux, chances are the editor you use is either vi or Emacs. While most people agree that vi is a hacker's tool and Emacs is more of a text editor, flame wars between the two camps aren't uncommon. vile, which stands for "vi like emacs," attempts to bring together the best of both worlds.

vi and Emacs are both full-function editors that you can extend with macros, but both have drawbacks. New users in particular find it difficult to get started with vi. You can't even enter text in vi without knowledge of its three modes and a handful of other commands. Emacs is modeless and thus friendlier for first-time users, but it's not nearly as fast as vi for editing and moving around in files.

vi has several clones, such as calvin, Elvis, nvi, viper, and Vim, but vile isn't another vi clone, according to its maintainer, Thomas Dickey. It has the most common vi commands, but doesn't look quite like vi. vile is an editor that works and feels like vi but, like Emacs, incorporates features for editing multiple files in multiple windows.

Surprisingly, vile grew out of MicroEMACS, whose author, Dave Conroy, didn't like the fully loaded Emacs. vile's current maintainer, Thomas Dickey, joined the project in 1992 after having been a vi user for almost 10 years.

Installing vile

vile is a small utility and painless to install. ./configure, make, and make install get you a working vile editor. Depending upon your distribution, you may also find binary install packages. For instance, if you're using Ubuntu, sudo apt-get install vile xvile vile-common vile-filters should get you both vile and xvile, a version with excellent X Window System support.

You need to let the compiler know if you want to use syntax highlighting. The command ./configure --with-screen=x11 --with-builtin-filters configures xvile and enables syntax coloring. ./configure --with-screen=x11 --with-builtin-filters="awk html c pl py" enables syntax coloring for AWK, HTML, C, Perl, and Python. For more options, read through the doc/config.doc file after exploring the vile source tarball.

Using [x]vile

The vile editors use their own startup files, whose location and name depend upon the method of installation. Try looking under the home directory for .vilerc if you compiled vile by hand. After performing an apt-get installation of vile under Ubuntu, I found the vileinit.rc under /usr/share/vile.

The xvile editor looks a tad more graphical than the vanilla vile editor. Both feature the Emacs-inspired information bar at the bottom, and xvile includes a toolbar on top for easier access to common tasks.

A vi user should have no problems getting started on the vile editors. In contrast to other vi implementations, even new users won't have to look around much -- Help -> General gets you started almost immediately. The editors also feature a few built-in commands that you'll find useful. :show-commands brings up a window that lists all commands alphabetically and includes a brief description of each. In case you forget which key does what, :describe-key prompts for a key and prints the function associated with it along with a brief description of that function.

As in Emacs, you can browse through directory listings and call up files you want to edit. Don't feel like typing that long command you used yesterday? Use the :show-history command, which splits the screen into two and dumps the contents of the [history] buffer (which stores all your commands) in a new window.

The :split command creates a new window. All windows share the same bottom line for the execution of commands but have separate status lines. The status line in the active window is filled with the equal (=) sign. Use :next-window and :previous-window to jump between windows. Ctr-K closes the active window.

vile uses the undolimit option in its configuration file to control how many changes it remembers. set undolimit=100 means you can undo the 100 most recent changes, whereas set undolimit=0 allows for an infinite undo. Vile is different from vim and uses the q quote command to select an area. For example, d2qjjq deletes (d) the lines (2q-q) selected by the motion (jj).

Take a look at the help file for a lowdown on the differences between vile and other popular vi clones. Brian Moore's Web page, designed using vile, has a nice collection of tutorials to get you started.


vile is a cross between an easy-to-use vi and a best-of Emacs. It scores points over Vim, one of the most popular clones of vi, because it's slimmer and yet manages to pack in all the essentials, along with functionality and features not found in most vi clones.

Share    Print    Comments   


on Review: vile editor is anything but

Note: Comments are owned by the poster. We are not responsible for their content.

vim handles multiple files too.

Posted by: Anonymous Coward on February 01, 2006 03:40 AM
I've been a (g)vim user for so long, I forgot that standard vi doesn't
support multiple files.<nobr> <wbr></nobr>:vs and<nobr> <wbr></nobr>:sp are my friends, not to
mention<nobr> <wbr></nobr>:ls,<nobr> <wbr></nobr>:b{num},<nobr> <wbr></nobr>:e#,<nobr> <wbr></nobr>:bn,<nobr> <wbr></nobr>:bN, and of course<nobr> <wbr></nobr>:mksession<nobr> <wbr></nobr>:)

I also have a handy vim function mapped to an autocmd so the cwd of vim is always the same as the file I'm currently editing.



Posted by: Anonymous Coward on February 01, 2006 10:28 PM
I think that vi and emacs are so difficult to use. My favourite text editor is nano.
But I seen an editor called 'ne', it seems very cool, but I have not tried it yet.



Posted by: Anonymous Coward on February 02, 2006 12:27 AM
nano, for those that don't know, is a pico clone -- the editor that comes with the pine email client. Features include a "cheet sheat" reference at the bottom of the page that describe basic key bindings, which are kept simple for the user. nano is best for quick edits by users who don't want to bother with learning a console editor and spend most of their time in a graphical interface.

If you can pick up nano, with a short tutorial, you could learn emacs. If you work on a lot of different UNIX flavors, learn vi and ed. They're everywhere and quite powerful.


nano beats all

Posted by: Anonymous Coward on February 02, 2006 12:30 PM
Why not bypass all the bull altogether and just use nano? Any sane person would agree.


Re:nano beats all

Posted by: Anonymous Coward on February 02, 2006 12:32 PM
nano is the best because it reminds me of my favorite editor of my old dos days, ped.


For god sake's stop no more editors

Posted by: Anonymous Coward on February 05, 2006 01:43 AM
Last thing linux need is another editor. Look like linux devlopers have a fetish towards editors


Vile is not vile, it is handy

Posted by: Administrator on February 01, 2006 11:59 AM
I first found about Vile in 1998, when I was preparing to move from one job to another. I mentioned to one of my associates that I would be needing some lightweight text editors that would be portable and could run on more than one platform, namely, on UNIX, Linux, and Windows systems.

I have been a longtime user of both Vi and Emacs, so I am comfortable using either style of editing. While I seldom need an editor that has as small of a footprint as Vile provides, it still comes in handy every now and then, and I occasionally still call upon it to assist me with my editing needs.

Yes, Vile is a handy cross platform editing tool, and Tom Dickey has faithfully maintained it for quite a while now, and he continues to improve it, yet he keeps it compact and relevant for text editing needs.


So this is...

Posted by: Administrator on February 07, 2006 07:14 AM
... for emacs people to be cool and say they use vi without having to learn the superior editor<nobr> <wbr></nobr>;-)


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya