Wikia

Vim Tips Wiki

Recreate tempfile directory

Talk0
1,599pages on
this wiki
Revision as of 08:59, April 5, 2009 by JohnBeckett (Talk | contribs)

Recently created tip

We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).

Please discuss whether to keep this as a new tip, or whether to merge it into an existing tip, on the new tips discussion page.
created August 27, 2008 · complexity basic · author Egr10whois · version 7.0

Occasionally, when an editing session is up for several days, but no feature that creates temporary files has been used, some administrative script (especially on multiuser or server systems configured to run for months at a time) may decide that Vim's temporary file directory is stale, because it hasn't been accessed in N days, and remove it.

Unfortunately, Vim's error reporting when this happens may not identify the missing directory path; for example:

:hardcopy
E324: Can't open PostScript output file

Fortunately, it is easy to determine the temporary file directory path:

:echo tempname()
/tmp/v012345/67

or even to recreate it, without ever leaving Vim:

:call mkdir(fnamemodify(tempname(),':h'),'p',0700)

Comments

Advertisement | Your ad here

Photos

Add a Photo
103photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki