...

View Full Version : VIM remote connection to Web site



rock_14
08-08-2007, 04:59 AM
Hi,

Lots of editors like DreamWeaver and Zend offer a way to remotely connect and edit files on a Web site.

I am still learning VIM and have heard that it is possible to connect to a Web site, supply a username and password and then use VIM to edit a Web site.

But, I have no idea how to do this. Can anyone point me in the right direction? After I open VIM I suspect I need to access the command line like this:

:! (somehow supply login credentials and IP or name of remote Web site)

:! username@remotesite.com (doesn't work)

Does anyone know?

ralph l mayo
08-08-2007, 06:05 AM
Try 'vim scp://username@host.com//path/to/file.ext'

In the second doubled slash, the second slash is the first slash of the path, so if you want to edit something in your home directory it might look like 'scp://username@host.com/~/file.ext'

You can use the same stream wrapper in any command where you'd specify a regular file that I've tried: :e, :w, :sp, :whatever

rock_14
08-08-2007, 06:39 AM
Try 'vim scp://username@host.com//path/to/file.ext'

In the second doubled slash, the second slash is the first slash of the path, so if you want to edit something in your home directory it might look like 'scp://username@host.com/~/file.ext'

You can use the same stream wrapper in any command where you'd specify a regular file that I've tried: :e, :w, :sp, :whatever

Thanks so much for your help! So if I have an account at Blue Host for a particular domain name (e.g., domain.com) and I just want to get a connection and browse and create a site from scratch (or view the files that are already there when I don't know the names of the file and just want to use VIM to look around), would I do this:

scp://username@domain.com/

What about the password?

ralph l mayo
08-08-2007, 07:20 AM
I just want to get a connection and browse and create a site from scratch (or view the files that are already there when I don't know the names of the file and just want to use VIM to look around), would I do this:

scp://username@domain.com/
Yeah, that seems to work fine, giving the same kind of listing it does if you :e /a/local/path/

if you use scp:// to target a file that doesn't exist it will be created fine so long as you have permission.


What about the password?
It prompts you for it. Better to not have it in plaintext in your command history :]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum