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

Programming Assistance

vile’s programming assistance capabilities are discussed in this section.

Edit-Compile Speedup

vile uses two straightforward vi mode commands to manage program development, shown in Table 18-7.

Table 18-7. vile program development vi mode commands
CommandFunction
^X !commandENTER

Run command, saving the output in a buffer named [Output].

^X ^X

Find the next error. vile parses the output and moves to the location of each successive error.

vile understands the Entering directory XXX and Leaving directory XXX messages that GNU make generates, allowing it to find the correct file, even if it’s in a different directory.

The error messages are parsed using regular expressions in the buffer [Error Expressions]. vile automatically creates this buffer, and then it uses the buffer when you use ^X ^X. You can add expressions to it as needed, and it has an extended syntax that allows you to specify where filenames, line numbers, columns, and so on appear in the error messages. Full details are provided in the online help, but you probably won’t need to make any changes, as it works pretty well “out of the box.”

vile’s error finder also compensates for changes in the file, keeping track of additions and deletions as you progress to each error.

The error finder applies to the most recent buffer created by reading from a shell command. For example, ^X!command produces a buffer named [Output], and :e !command produces a buffer named [!command]. The error finder will be set appropriately. ...

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