October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 105 | Compile Code Without Leaving Vim |
Calling an external compiler from Vim saves us from having to leave our editor—and if the compiler reports any errors, Vim provides the means for us to jump between them quickly.
We’ll use a small C program to demonstrate. The source files are distributed with this book (for more details, refer to Downloading the Examples). In the shell, change to the code/quickfix/wakeup directory:
| => | $ cd code/quickfix/wakeup |
You’ll need gcc to build this program, but don’t feel that you need to install a compiler just to follow this tip. The workflow here demonstrates the task for which the quickfix list was originally conceived (and from which it takes its name). As we’ll soon see, this feature ...