12.4 Job Control and autowrite: Real Time Savers!I see too many people using a series of commands like the ones that follow. Programmers do this when they write and compile programs. Writers use this when they're making a draft file and running it through the formatter. They're probably wasting a lot of time and effort:
%
Each time they restart
vi
, they have to reset options and move the
cursor to the place they were working before.
After they restart,
vi
has forgotten the previous search (the
n
command), the previous action (the
If your system has
job control (
12.8
)
,
that'll solve all these problems.
[1]
Instead of quitting
vi
, get into command mode
and write your buffer with the
Even better, you can set
vi
's option called
autowrite
.
If you've made any changes to the buffer before you press CTRL-z,
vi
will automatically write the buffer.
You won't need to remember to type [You don't absolutely have to write your file before suspending vi . It's a good piece of advice, but not required by the job control mechanism. Typing CTRL-z will suspend the editor whether you've written out your files or not. - TOR ] - |
|