Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VIM remote connection to Web site

    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?

  • #2
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    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

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ralph l mayo View Post
    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?

  • #4
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    Quote Originally Posted by rock_14 View Post
    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 :]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •