gvim e303 无法打开 “***“的交换文件,恢复将不可能
在vim中配置了Project,但是在文件切换的时候总是会报错E303,导致每次文件切换都会提示一次,明显影响开发效率。
参考了vim中文网上的一篇文章,按照文章的做法操作了一下。
首先:help E303
Unable to open swap file for "{filename}", recovery impossible Vim was not able to create a swap file. You can still edit the file, but if Vim unexpected exits the changes will be lost. And Vim may consume a lot of memory when editing a big file. You may want to change the 'directory' option to avoid this error. See |swap-file|.
然后查看
:set directory?
directory=.,c:\tmp,c:\temp
查找了一下,可以改成一个存在的目录,但是网上推荐的办法是这样
:set directory=.,$TEMP
修改之后,问题解决。