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.
: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.
- 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.