LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-28-2006, 03:25 PM   #1
depi
LQ Newbie
 
Registered: Apr 2005
Location: EU - Slovakia
Posts: 12

Rep: Reputation: 0
Post Editing remote files (on FTP) with VIM does not works


Hi everyone!

In the past three days I'm fighting with editing files on my web FTP server.

I know that if I want to edit files online I just need to do for example
Code:
:e ftp://username@host/path/to/file
- yes I'm prompted to insert my password but then VIM (or GVim) just freeze-up and I cannot do anything. If I try to insert any command than I get only some strange characters so I must close the window (or terminal)

Or sometimes it connects but open only blank file.

So what can be the problem? The password and username is correct. (I can connect to FTP through gFtp or MC very well)

Also I would like to know how can I browse my files online on FTP.

If it helps I'm using Ubuntu, but I think that is not the point.
 
Old 08-29-2006, 09:48 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
FTP is for file transfers only. Hence, FTP (File Transfer Protocol). You should transfer or copy your file from the remote computer to your local computer first, then you can edit it in your local hard drive. If you want to overwrite the file then you have to upload it but you can only do that if you have the permission to do so.

In contrast, NFS allows you to mount the remote directory and modify the file as if it was on your hard disk.
 
Old 09-04-2006, 07:18 AM   #3
tbk
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by depi
I know that if I want to edit files online I just need to do for example
Code:
:e ftp://username@host/path/to/file
- yes I'm prompted to insert my password but then VIM (or GVim) just freeze-up and I cannot do anything. If I try to insert any command than I get only some strange characters so I must close the window (or terminal)

Or sometimes it connects but open only blank file.
The syntax is
Code:
:e ftp://username@host//absolute/path/to/file
(note the extra slash) or
Code:
:e ftp://username@host/relative/path/to/file/from/home/directory
This may explain why the file opens up blank (i.e. it's not found) but not the dodgy connections.
 
Old 09-04-2006, 07:23 AM   #4
tbk
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by ramram29
FTP is for file transfers only. Hence, FTP (File Transfer Protocol). You should transfer or copy your file from the remote computer to your local computer first, then you can edit it in your local hard drive. If you want to overwrite the file then you have to upload it but you can only do that if you have the permission to do so.

In contrast, NFS allows you to mount the remote directory and modify the file as if it was on your hard disk.
True, but vim has the facility to edit remote files by ftp or scp - vim copies the file from the server to a tmp directory and on saving copies the new file back.
 
  


Reply

Tags
edit, ftp, remote, vim


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronizing remote and local files via FTP? InExtremis Linux - Software 2 05-15-2006 08:02 AM
is there an html editor with remote files editing capabilities? odysseus.lost Linux - Software 2 06-16-2005 07:23 AM
Vim: ftp save no longer works after reinstall GreenPenInc Linux - Software 0 06-14-2005 02:59 PM
VIM: editing files via ftp robertmarkbram Linux - Software 2 10-17-2004 01:41 AM
editing two files in vim schatoor Linux - Software 2 12-28-2002 08:56 AM


All times are GMT -5. The time now is 01:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration