Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use gvim on Windows. How can I open a new file?

I have tried with :e ~\mypath\myfile.txt but I get this error message:

E303: Unable to open swap file for "C:\Users\Jonas\mypath\myfile.txt", recovery impossible

How to open a new file using gvim on Windows?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

This seem to be a bug. From Vim E303: Unable to open swap file for "[No Name]", recovery impossible, I should add this to _gvimrc:

set directory=.,$TEMP

And it worked for me.

share|improve this answer
    
Thanks! Using the environmental variable TEMP seems the best way to go, yet so few people suggest it from what I've seen. –  leetNightshade Apr 2 at 22:43

Your Answer

 
discard

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.