LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   VIM: editing files via ftp (https://www.linuxquestions.org/questions/linux-software-2/vim-editing-files-via-ftp-243648/)

robertmarkbram 10-17-2004 12:43 AM

VIM: editing files via ftp
 
Hi All!

I am using RH9 with bash and VIM 6.1

I have plugins enabled in VIM:
robertmarkbram:/tmp/
$ cat ~/.vimrc | grep filetype
" Use the default filetype settings, so that mail gets 'tw' set to 72, filetype plugin indent on

I am trying to edit files via ftp.

Using gftp, I can log onto my server like this
host name: myhost.edu.au
Port 20
username: rob
password: blah
and grab a file /rob/My Web/default.asp

But I am having trouble editing the file. I tried each of the following strings:
vim ftp://phd.netcomp.monash.edu.au/rob/My\\\ Web/default.asp
vim "ftp://phd.netcomp.monash.edu.au/rob/My\\ Web/default.asp"
vim 'ftp://phd.netcomp.monash.edu.au/rob/My\ Web/default.asp'

I got this error message after entering username and password:

shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory
4 lines filtered
Error detected while processing function <SNR>14_NetRead..<SNR>14_NetGetFile:
line 13:
Can't open file /tmp/v890143/0
Hit ENTER or type command to continue

Only "/tmp/v890143/0" changed each time.

When I tried this http string:
vim http://myhost.edu.au/RobertMarkBram/default.asp

I succesfully opened the file, but for reading only - and it didn't ask for my username or password.

Any ideas would be most appreciated!

Rob
:)

trickykid 10-17-2004 12:52 AM

ftp has a limited shell, its only intention is to retrieve or put files on a server, not editing. Use ssh or other means for direct access (via shell) to this server if you want to edit via a command line.

robertmarkbram 10-17-2004 01:41 AM

Quote:

Originally posted by trickykid
ftp has a limited shell, its only intention is to retrieve or put files on a server, not editing.
Hmm.. but I am having trouble using vim which has this capacity:
http://www.polarfox.com/vim/manual/v61/pi_netrw.html

At least, I am sure that is what this plugin is meant for..

Rob
:)


All times are GMT -5. The time now is 08:35 AM.