0

I am trying to create and edit a file remotely from my iPad using iVim to my Linux box which is on the same network. I am trying to use the ftp protocol from the netrw utility that comes with vim. I keep getting this weird error which let me start editing the file but doesn’t let me save it. Can anyone help?

Perhaps my network drops out? Or I am losing packets? I am not a networking expert by any means

enter image description here

The private/var path is the directory that iVim creates when it wants to save files in the iVim app(almost like a pseudo-directory). iVim can't truly have access to the iPad's file system. Not using Docker or anything of the sort for this operation.

  • Are you using Docker or equivalent somewhere in this scenario? That path (/private/var/...) looks kind of like the path of a volume associated with a Docker container. Such paths aren't usually the kind of thing you'd edit with remote vim (or do much of anything with outside of a Docker context). Regardless, you should provide more details in your question. (E.g. are you naming that file explicitly or do you not even recognize it? What exactly are you doing in the lead up to these error messages?) – B Layer May 25 '19 at 1:22
  • I am trying to create/edit a file on my raspberry pi over a network. I am doing this using vim 7.4(the version that is on iVim) using the netrw utility. Trying to use the Nwrite command with the ftp protocol. :Nwrite "ftp://[user@]machine[[:#]port]/path" This is the command i am trying to issue in iVim to write/create the file on my raspi. Thank you for your interest – Christian Montes De Oca May 25 '19 at 3:29
  • Good start. Please update your question with that info (hit the "edit" link/button). Also, please reply about how, if at all, Docker volume is involved and/or whether you recognize that /private/var path. (If none of that is known/relevant you can just comment. Otherwise add that to your question, too.) – B Layer May 25 '19 at 3:36
  • This might need Apple experts rather than Vim experts. Only suggestion I have is to check whether you can consistently access that same file through a different ftp client. If not then that rules out vim/netrw as cause. If so then it could be the ftp client used by netrw. – B Layer May 26 '19 at 21:16
1

Neither the netrw plugin nor Vim itself actually includes an FTP client: netrw just calls the system’s FTP executable.

iOS doesn’t really support this sort of thing, and doesn’t include an FTP client, thus, you cannot use FTP with the version of iVim that is currently available on the App Store.

You might, however like to keep an eye on this pull request to the iVim source repository. It doesn’t mention FTP specifically, but it does add a significant number of external programs that can be called by Vim, and there’s no reason an FTP client couldn’t be added to these.

You also might like to look into iVim’s support for document providers (see :help idoc). You can use this in combination with a suitable third party FTP app—such as the sadly defunct Transmit—to edit remote documents in iVim via a slightly more iOS-native interface.

UPDATE (January 2020)

The latest versions of iVim have incorporated the pull request mentioned above. There is still no FTP command available, but you can now edit remote files by using scp (which, when available, you should prefer over FTP, anyway).

See :help ios-external-cmds for more details on iVim's external commands, type :!Ctrl-D for a list of the currently available commands, or see :help netrw for more details on using scp in netrw.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.