O'Reilly logo

Learning the vi and Vim Editors, 7th Edition by Linda Lamb, Elbert Hannah, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interesting Features

vile has a number of interesting features that are the topic of this section:

The vile editing model

vile’s editing model is somewhat different from vi’s. Based on concepts from Emacs, it provides key rebinding and a more dynamic command line.

Major modes

vile supports editing “modes.” These are groups of option settings that make it convenient for editing different kinds of files.

The procedure language

vile’s procedure language allows you to define functions and macros that make the editor more programmable and flexible.

Miscellaneous small features

A number of smaller features make day-to-day editing easier.

The vile Editing Model

In vi and the other clones, editing functionality is “hardwired” into the editor. The association between command characters and what they do is built into the code. For example, the x key deletes characters, and the i key enters insert mode. Without resorting to severe trickery, you cannot switch the functionality of the two keys (if it can even be done at all).

vile’s editing model, derived from Emacs through MicroEMACS, is different. The editor has defined, named functions, each of which performs a single editing task, such as delete-next-character or delete-previous-character. Many of the functions are then bound to keystrokes, such as binding delete-next-character to x.[69]

vile has different flavors of key bindings for its insert, command, and selection modes. Here we are describing the bindings for the normal editing mode. Changing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required