Vim Tips Wiki
(remove <tt> that was surrounding whole tip...this is the only tip that did this. If you prefer monotype, change your browser settings.)
(Added E810 (in 7.3.46) to the list of errors that this helps solve)
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
This tip will help resolve error messages E97, E483 and E485 encountered on machines running MS Windows. These errors relate to the creation of, or reading of temporary files. See {{help|E97}}, {{help|E483}}, {{help|E485}}. Also see [[VimTip416|Fix error E97 Cannot create diffs under Windows]].
+
This tip will help resolve error messages E97, E483, E485 and E810 encountered on machines running MS Windows. These errors relate to the creation of, or reading of temporary files. See {{help|E97}}, {{help|E483}}, {{help|E485}}. Also see [[VimTip416|Fix error E97 Cannot create diffs under Windows]].
   
 
<pre>
 
<pre>

Revision as of 17:47, 2 March 2013

Tip 1532 Printable Monobook Previous Next

created November 13, 2007 · complexity basic · author corp-mule · version 7.0


This tip will help resolve error messages E97, E483, E485 and E810 encountered on machines running MS Windows. These errors relate to the creation of, or reading of temporary files. See :help E97, :help E483, :help E485. Also see Fix error E97 Cannot create diffs under Windows.

*e97* Can't create diffs blah blah
*e485* Can't read file blah blah

I've experienced these errors when trying to use the diff commands, or any shell commands being called via the :! or :r! commands.

That is,

:r! sort blah blah blah %
or
:r! dir
etc

To correct this problem you need to change your environment variable for $TMP or $TEMP. You can do this in a couple of different ways.

1. Use the Windows environment settings. Here is one method.

    - Right click "My Computer".

    - Choose "Properties".

    - Click the "Advanced" tab.

    - Click the "Environment Variables" button.

    - In the bottom window pane, scroll down to the TMP or
      TEMP variables and highlight them.

    - Then click the "Edit" button and change the path to
      the directory you want.

2. Use Vim – much better!

    - Add the following to your _vimrc file:
      let $TMP="c:/tmp"

In both cases, you need to create the directory (for example, C:\tmp), and you need read and write permission in that directory.

Comments

 TO DO 

  • This tip needs reworking. A reader could get the impression that the only cause for the specified errors is due to TMP.
  • Add a brief explanation of what the environment variables do.
  • Probably want reference to :help dos-temp-files. Any others?
  • The title is not helpful because a reader would only search for this title if they already knew the cause of their problem.