8.7. Programming Assistance
vi was developed primarily as a programmer's editor. It has features that make things especially easy for the UNIX programmer—someone writing C programs and troff documentation. (Real Programmers write Real Documentation in troff.) Several of the clones are proud bearers of this tradition, adding a number of features that make them even more usable and capable for the "power user."[10]
[10] In contrast to the What You See Is What You Get (WYSIWYG) philosophy, UNIX is the You Asked For It, You Got It operating system. (With thanks to Scott Lee.)
Two features (among many) most deserve discussion:
Edit-compile speedup
elvis, vim, and vile allow you to easily invoke make(1), capture the errors from your compiler, and automatically move to the lines containing the errors. You can then fix the errors and re-run make, all from within the editor.
Syntax highlighting
elvis, vim, and vile have the ability to highlight and/or change the color of different syntactic elements in different kinds of files.
8.7.1. Edit-Compile Speedup
Programming often consists of a "compile-test-debug" cycle. You make changes, compile the new code, and then test and debug it. When learning a new language, syntax errors are especially common, and it is frustrating to be constantly stopping and restarting (or suspending and resuming) the editor in between compiles.
elvis, vim, and vile all provide facilities that allow you to stay within the editor while compiling your program. ...
Get Learning the vi Editor, Sixth 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.