- 论坛徽章:
- 0
|
Table 8.8. Position and Mode Indicators
Editor With ruler, displays With showmode, displays
nvi row and column insert, change, replace, and command mode indicators
elvis row and column input and command mode indicators
vim row and column insert, replace, and visual mode indicators
vile
row, column, and
percent of file
insert, replace, and overwrite mode indicators
vi N/A
separate mode indicators for open, input, insert,
append, change, replace, replace one character, and
substitute modes
The GUI versions of elvis and vim change the cursor shape depending upon the
current mode.
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鈥攕omeone 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."[9]
[9] 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. Furthermore, they capture the compiler's output
and use it to automatically go to each line that contains an error.[10] Consistent
use of this ability can save time and improve programmer productivity. |
|