O'Reilly logo

Learning the vi and Vim Editors, 7th Edition by Elbert Hannah, Linda Lamb, 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

Improved Editing Facilities

This section describes the features of vile that make simple text editing easier and more powerful.

Command-Line History and Completion

vile records your ex commands in a buffer named [History]. This feature is controlled with the history option, which is true by default. Turning it off disables the history feature and removes the [History] buffer. The command show-history splits the screen and displays the [History] buffer in a new window.

The colon command line is really a minibuffer. You can use it to recall lines from the [History] buffer and edit them.

You use the and keys to scroll backward and forward in the history, and and to move around within the line. Your current delete character (usually BACKSPACE) can be used to delete characters. Any other characters you type will be inserted at the current cursor position.

You can toggle the minibuffer into vi mode by typing the mini-edit character (by default, ^G). When you do this, vile will highlight the minibuffer using the mechanism specified by the mini-hilite option. The default is reverse, for reverse video. In vi mode, you can use vi-style commands for positioning. You can also use other vile commands that are appropriate to editing within a single line, such as i, I, a, and A. vile decides which commands to accept based on its command tables, which allows your key bindings to work in the minibuffer, too.

An interesting feature is that vile will use the history to show you previous data that ...

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