Cover by Linda Lamb, Elbert Hannah, Arnold Robbins

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Improved Editing Facilities

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

Command-Line History and Completion

Everything you type on the ex command line is saved in a buffer named Elvisexhistory. This is accessible like any other elvis buffer, but it is not directly useful when just viewed in a window.

To access the history, you use the arrow keys to display previous commands and to edit them. Use and to page through the list, and and to move around on a command line. You can insert characters by typing, and you can erase them by backspacing over them. Much as when editing in a regular vi buffer, the backspace does remove the characters, but the line is not updated as you type, so be careful!

When entering text into the Elvis ex history buffer (i.e., on the colon command line), the TAB key can be used for filename expansion. The preceding word is assumed to be a partial filename, and elvis searches for all matching files. If there are multiple matches, it fills in as many characters of the name as possible, and then beeps; or, if no additional characters are implied by the matching filenames, elvis lists all matching names and redisplays the command line. If there is a single match, elvis completes the name and appends a tab character. If there are no matches, elvis simply inserts a tab character.

To get a real tab character, precede it with a ^V. You can also disable filename completion entirely by setting the Elvis ex ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required