It seems that netrw
invokes wget
or fetch
(via cmd
, not powershell
which aliases wget
for the built-in Invoke-WebRequest
command) for retrieving the spell file:
C:\WINDOWS\system32\cmd.exe /c (wget ^"http://ftp.vim.org/pub/vim/runtime/spell/fr.utf-8.spl^" -q -O ^"C:\Users\MAGGYERO\AppData\Local\Temp\VIA77E3.spl^")
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
and the suggestion file:
C:\Windows\system32\cmd.exe /c (wget ^"http://ftp.vim.org/pub/vim/runtime/spell/fr.utf-8.sug^" -q -O ^"C:\Users\MAGGYERO\AppData\Local\Temp\VIA126E.sug^")
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
If wget
or fetch
is not in the PATH environment variable (which was my case), netrw
invokes ftp
.
In active mode (the default), ftp
opens a T.C.P. control connection to the server port 21 and accepts a T.C.P. data connection opened by the server to a client port between 1024 and 65635—so if the client has a firewall or a NAT gateway it must be correctly set up.
In passive mode, ftp
opens a T.C.P. control connection to the server port 21 and opens a T.C.P. data connection to a server port between 1024 and 65635—so if the server has a firewall or a NAT gateway it must be correctly set up.
As we are behind a NAT gateway (and maybe a firewall) at the office, it might be the reason why ftp
failed. Switching to passive mode (:let g:netrw_ftp_cmd= "ftp -p"
) removed the errors but kept the warnings so the downloading is still failing, for a reason that I ignore (maybe because the server has a firewall or a NAT gateway that is not correctly set up, or simply because the server does not allow passive mode).
So simply installing GNU Wget from Sourceforge and adding it to the PATH environment variable solved the issue: http://gnuwin32.sourceforge.net/packages/wget.htm
~/.vim/spell
withwget http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl
andwget http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug
. More information (in French) can be found here – statox Aug 22 '18 at 7:51:let g:netrw_ftp_cmd= "ftp -p"
to switch theftp
command to passive mode, like suggested in the help, before typing:set spell
. Now the errors are gone but the warnings are still there, so the downloading still fails. Why do the files are not readable? I even tried executing Vim in administrator mode, without luck. – Maggyero Aug 22 '18 at 10:56:h netrw-debug
– Christian Brabandt Aug 22 '18 at 11:59