O'Reilly logo

Learning the vi Editor, Sixth Edition by 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

11.9. Programming Assistance

vim has extensive facilities for both the edit-compile-debug cycle and syntax highlighting.

11.9.1. Edit-Compile Speedup

The facilities in vim were inspired by the "quick fix" mode of the Manx Aztec C compiler for the Amiga. In fact, the vim documentation refers to this feature as "quick fix" mode. The features are quite flexible, allowing you to tailor them to your programming environment (see Table 11.12).

Table 11.12. vim Program Development Commands
CommandFunction
mak[e] [arguments]Run make, based on the settings of several options as described below, then go to the location of the first error.
cf[ile][!] [errorfile]Read the error file and jump to the first error. With an errorfile, use that file for errors and set the errorfile option to it. The ! forces vim to move to another buffer if the current one has been modified but not saved.
cl[ist][!]List the errors that include a filename. With !, list all errors.
[count]cn[ext][!]Display the countth next error that includes a filename. If there are no filenames at all, go to the countth next error.
[count]cN[ext][!]Display the countth previous error that includes a filename. If there are no filenames at all, go to the countth previous error.
[count]cp[revious][!]
clast[!] [n]Display error n if supplied. Otherwise, display the last error.
crewind[!] [n]Display error n if supplied. Otherwise, display the first error.
cc[!] [n]Displays error n if supplied, otherwise redisplays the current error. ...

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