I'm using cmder as my Win7 shell. I see the following behaviour:
Works fine (file in current directory):
vim test
Works fine (absolute path):
vim ~/test
Works fine (relative path with forward slash):
vim subdir/test
Does not work fine (relative path with backward slash):
vim subdir\test
The last example flashes the following in vim:
E303: Unable to open swap file for "subdir\test", recovery impossible.
Doing :set dir
shows:
directory=~/vimswap
which exists and is permissioned correctly (after all, I don't get errors when opening absolute path files, only relative path ones).
I suspect this might have something to do with how cmder/vim represent relative paths - maybe a forward slash/backslash issue?
set shellslash?
show? If you set the opposite value in your vimrc file does it help?\
but looks like you are using/
.set shellslash
doesn't show anything. However, doingvim subdir\test
works fine - it's thevim subdir/test
command that fails. I think it's because windows paths use\
, but cmder seems to autocomplete with/
.:set shellslash
...:set shellslash?
... you forgot the?
and turned shellslash on. Still, try puttingset shellslash
(this time without the question mark) in your vimrc and see if it matters. I suspect not, though. I think you just can't use the version you have with/
.