vi won’t write because /var is too full?

Ever run into the issue where vi won’t write because your /var is too full?
It seems to happen all the time on some Solaris boxes. No matter. Just set up a global .exrc and do a:

set directory=/tmp

If /tmp doesn’t work, just change it to some other drive. The reasoning is simple. /var/tmp is where it is usually used for temporary files. Unfortunately default partitioning of Unix boxes sometimes do not take into account of larger temporary files taking over the /var directory. That along with the HLM will basically render the /var partition useless for vi regardless if there is actually space there (HLM is usually set to 90%, although some systems are set to 80%).
Having said that, you can set it up so that temporary files are stored anywhere. This gives you a lot more freedom as an administrator without having to repartition or take down a system.