UNIX Hints & Hacks |
||||||||||||||||||||||||||||||||
Chapter 8: Editors |
|
|||||||||||||||||||||||||||||||
|
If the partition is full where the defined temporary space is, vi crashes and never loads. These areas are usually set by default to /tmp, /usr/tmp, and /var/tmp. It makes use of the temporary space to store a copy of the file being edited. If the system were to crash it would use this temporary file to recover the file.
Flavors: AT&T, BSD
Shells: All
Syntax:
set directory=absolute_path
To get vi up and running all you have to do is set vi to look and write to a different temporary area. This can be done by setting the directory parameter for vi.
If you are using sh or ksh shells, place the parameter setting into the .profile your home directory.
EXINIT='set directory=/bigdisk/tmp' export EXINIT
If you are using the csh or tcsh shells, make the additions to your .cshrc or .login file and re-source the file.
setenv EXINIT 'set directory=/bigdisk/tmp'
The last place that you can put the parameter setting is within the .exrc file in your home directory. Keep in mind that the EXINIT variable in your login scripts take precedence over the .exrc file.
The system's temporary space fills up and you generally have no control over it. If possible and another temporary space is available with much more disk space, you might want to hardcode the setting into your login scripts or .exrc file so you will not get hit with this problem.
I've seen in some instances where administrators have attempted to hardcode the directory parameter for root to another area off the system drive. The first time that the partition containing the temporary area didn't mount, vi was useless. For root, you should leave it alone and accept the default setting for it.
Man page:
vi
UNIX Hints & Hacks |
||||||||||||||||||||||||||||||||
Chapter 8: Editors |
|
|||||||||||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.