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.
Command | Function |
^X
! command ENTER | Run command, saving the
output in a buffer named |
^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. ...
Get Learning the vi and Vim Editors, 7th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.