vim 7 gives error when editing /etc/hosts
Tue Jun 13 14:57:00 GMT 2006
> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org] On Behalf Of Frank Fesevur
> Sent: Tuesday, June 13, 2006 5:35 AM
> To: email@example.com
> Subject: vim 7 gives error when editing /etc/hosts
> When I try to edit /etc/hosts with vim7, it gives this error:
> E303: Unable to open swap file for "hosts", recovery impossible
> The file can be edited, but this never happened with 6.4
vim appears to be unable to follow some links.
The following steps lead to the above error for me, also.
$ touch "c:\foo.txt"
$ ln -s "c:\foo.txt" bar.txt
$ vim bar.txt # vim reports the swap-file error
On my computer, and I suspect on yours, /etc/hosts is a
symbolic link to Windows 'hosts' file:
$ ls -ln /etc/hosts
lrwxrwxrwx 1 13558 545 37 Apr 4 18:11 /etc/hosts ->
Curiously, the link does not cause an error if it was created using
$ ln -fs /c/foo.txt bar.txt # assumes that you've set the cygdrive
prefix to "/"
$ vim bar.txt # No swap-file error is reported.
Until the problem code and its solution can be identified, you
should be able to use this workaround.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin