Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When vim uses the shell given a colon !command, it does so through the /tmp filesystem. How do you force vim to use ~/.vim/tmp/ instead? It also uses /tmp for help files when zcat is required to read some of the manuals.

TMPDIR doesn't work for this case.

share|improve this question
up vote 2 down vote accepted

Have you tried setting the TMPDIR environment variable? That's the standard way (across most "Unix style" programs I've had to worry about it for) of specifying an alternate location for temporary files.

share|improve this answer
Actually, this works. I was thinking you were referring to vim's 'directory' setting. Thanks. – atx Jul 23 '11 at 11:57
I've clarified my wording to make it clear I was referring to the env var. – womble Jul 23 '11 at 12:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.