Loading ...
Sorry, an error occurred while loading the content.

netrw with scp in MacVim

Expand Messages
  • Smitti
    Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/ tip.php?tip_id=337) does not seem to work. It works fine on the shell, but UI does not
    Message 1 of 7 , Jul 8, 2008
    • 0 Attachment
      Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
      tip.php?tip_id=337) does not seem to work. It works fine on the shell,
      but UI does not ask for password and opens an empty temp file. Any
      idea how to make it work?
      I use latest snapshot 33.

      Thanks,
      Smitti

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ted Pavlic
      The first slash is actually translated into a colon by netrw. For example... vi scp://tedpavlic@tedpavlic.com/blah.txt causes netrw to execute scp
      Message 2 of 7 , Jul 25, 2008
      • 0 Attachment
        The first slash is actually translated into a colon by netrw.

        For example...

        vi scp://tedpavlic@.../blah.txt

        causes netrw to execute

        scp tedpavlic@...:blah.txt temp_file

        So if you want to edit something in your *HOME* directory, omit a path
        entirely and treat the first slash as a delimiter.

        --Ted



        robert.hopson wrote:
        > I have found that it seems to require an extra slash after the
        > hostname; so rather than
        >
        > scp://user@.../tmp/file.txt
        >
        > I have to use:
        >
        > scp://user@...//tmp/file.txt
        >
        > I have only just started using it, so I don't know if that constitutes
        > a bug or not.
        >
        > -Robert
        >
        > On Jul 8, 11:45 am, Smitti <AdamSmyc...@...> wrote:
        >> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
        >> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
        >> but UI does not ask for password and opens an empty temp file. Any
        >> idea how to make it work?
        >> I use latest snapshot 33.
        >>
        >> Thanks,
        >> Smitti
        > >
        >

        --
        Ted Pavlic <ted@...>

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ted Pavlic
        ... Paths are home referenced unless you specify a leading slash. --Ted ... -- Ted Pavlic
        Message 3 of 7 , Jul 25, 2008
        • 0 Attachment
          Also note that all of this is documented in netrw's help:

          :help netrw

          Paths are "home referenced" unless you specify a leading slash.

          --Ted

          Ted Pavlic wrote:
          > The first slash is actually translated into a colon by netrw.
          >
          > For example...
          >
          > vi scp://tedpavlic@.../blah.txt
          >
          > causes netrw to execute
          >
          > scp tedpavlic@...:blah.txt temp_file
          >
          > So if you want to edit something in your *HOME* directory, omit a path
          > entirely and treat the first slash as a delimiter.
          >
          > --Ted
          >
          >
          >
          > robert.hopson wrote:
          >> I have found that it seems to require an extra slash after the
          >> hostname; so rather than
          >>
          >> scp://user@.../tmp/file.txt
          >>
          >> I have to use:
          >>
          >> scp://user@...//tmp/file.txt
          >>
          >> I have only just started using it, so I don't know if that constitutes
          >> a bug or not.
          >>
          >> -Robert
          >>
          >> On Jul 8, 11:45 am, Smitti <AdamSmyc...@...> wrote:
          >>> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
          >>> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
          >>> but UI does not ask for password and opens an empty temp file. Any
          >>> idea how to make it work?
          >>> I use latest snapshot 33.
          >>>
          >>> Thanks,
          >>> Smitti
          >>>
          >

          --
          Ted Pavlic <ted@...>

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • robert.hopson@gmail.com
          Thanks Ted - it is clearly documented, and I will read more of the netrw stuff. As a guy who uses scp from a command line quite a bit I just didn t expect that
          Message 4 of 7 , Jul 25, 2008
          • 0 Attachment
            Thanks Ted - it is clearly documented, and I will read more of the
            netrw stuff.

            As a guy who uses scp from a command line quite a bit I just didn't
            expect that behavior. But, it makes some sense.

            -Robert

            On Jul 25, 9:05 am, Ted Pavlic <t...@...> wrote:
            > Also note that all of this is documented in netrw's help:
            >
            >         :help netrw
            >
            > Paths are "home referenced" unless you specify a leading slash.
            >
            >         --Ted
            >
            >
            >
            > Ted Pavlic wrote:
            > > The first slash is actually translated into a colon by netrw.
            >
            > > For example...
            >
            > >    vi scp://tedpav...@.../blah.txt
            >
            > > causes netrw to execute
            >
            > >    scp tedpav...@...:blah.txt temp_file
            >
            > > So if you want to edit something in your *HOME* directory, omit a path
            > > entirely and treat the first slash as a delimiter.
            >
            > >    --Ted
            >
            > > robert.hopson wrote:
            > >> I have found that it seems to require an extra slash after the
            > >> hostname; so rather than
            >
            > >>   scp://u...@.../tmp/file.txt
            >
            > >> I have to use:
            >
            > >>   scp://u...@...//tmp/file.txt
            >
            > >> I have only just started using it, so I don't know if that constitutes
            > >> a bug or not.
            >
            > >> -Robert
            >
            > >> On Jul 8, 11:45 am, Smitti <AdamSmyc...@...> wrote:
            > >>> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
            > >>> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
            > >>> but UI does not ask for password and opens an empty temp file. Any
            > >>> idea how to make it work?
            > >>> I use latest snapshot 33.
            >
            > >>> Thanks,
            > >>> Smitti
            >
            > --
            > Ted Pavlic <t...@...>
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Ben Schmidt
            ... Well, it behaves...differently...in gvim. It doesn t show a prompt, but it freezes and you can type in your password and push return and it works. Can
            Message 5 of 7 , Aug 4, 2008
            • 0 Attachment
              Louis wrote:
              > On Jul 8, 2:45 pm, Smitti <AdamSmyc...@...> wrote:
              >> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
              >> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
              >> but UI does not ask for password and opens an empty temp file. Any
              >> idea how to make it work?
              >> I use latest snapshot 33.
              >
              > This is definitely a problem. I see the exact same symptoms using
              > snapshot 33. None of the ssh-type commands work. Plain old ftp does
              > work properly, though. But that's not what we want!
              >
              > This has nothing to do with what the other replies were saying about
              > the double slash after the hostname. That's a separate thing. I have
              > not tried other gvims, so I don't know if this is a MacVim issue or
              > just a Vim7-gvim issue in general.
              >
              > Louis

              Well, it behaves...differently...in gvim. It doesn't show a prompt, but
              it 'freezes' and you can type in your password and push return and it
              works.

              Can you confirm the contents of the buffer after this fails? I see the
              standard netrw heading and then about three lines that say things along
              the lines of 'authentication failed'. Do you see the same thing or
              something different?

              If you use public key cryptography rather than password authentication
              and it will work without a password. This is fairly easy to set up;
              there is documentation in the netrw help, but it is wrong, as I
              explained in a recent thread.

              http://groups.google.com/group/vim_use/msg/e825519206293206

              This might be a workaround until MacVim can be fixed.

              Ben.



              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Louis
              ... I get an empty buffer trying to load a file. But if I try to load a directory, I get the netrw header and then... Permission denied
              Message 6 of 7 , Aug 4, 2008
              • 0 Attachment
                On Aug 4, 10:06 am, Ben Schmidt <mail_ben_schm...@...> wrote:
                > Louis wrote:
                > > On Jul 8, 2:45 pm, Smitti <AdamSmyc...@...> wrote:
                > >> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
                > >> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
                > >> but UI does not ask for password and opens an empty temp file. Any
                > >> idea how to make it work?
                > >> I use latest snapshot 33.
                >
                > > This is definitely a problem. I see the exact same symptoms using
                > > snapshot 33. None of the ssh-type commands work. Plain old ftp does
                > > work properly, though. But that's not what we want!
                >
                > > This has nothing to do with what the other replies were saying about
                > > the double slash after the hostname. That's a separate thing. I have
                > > not tried other gvims, so I don't know if this is a MacVim issue or
                > > just a Vim7-gvim issue in general.
                >
                > > Louis
                >
                > Well, it behaves...differently...in gvim. It doesn't show a prompt, but
                > it 'freezes' and you can type in your password and push return and it
                > works.
                >
                > Can you confirm the contents of the buffer after this fails? I see the
                > standard netrw heading and then about three lines that say things along
                > the lines of 'authentication failed'. Do you see the same thing or
                > something different?

                I get an empty buffer trying to load a file. But if I try to load a
                directory, I get the netrw header and then...

                Permission denied (publickey,password,keyboard-interactive).
                Permission denied, please try again.
                Permission denied, please try again.
                ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
                ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
                ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory

                ... so there's the problem. MacVim depends on ssh-askpass, which, I
                gather is not a part of newer openssh distributions.
                I installed an X11-ssh-askpass, and it works, but you need to have X11
                installed :(

                It seems like gvim needs to have this functionality built-in, rather
                than depend on distribution-dependent paths for ssh-askpass
                and window-system dependent ssh-askpass implementations.

                >
                > If you use public key cryptography rather than password authentication
                > and it will work without a password. This is fairly easy to set up;
                > there is documentation in the netrw help, but it is wrong, as I
                > explained in a recent thread.

                That'll be a fine workaround for the time being, but now I have to go
                do it!

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Ben Schmidt
                ... ssh-askpass is an X thing, and just not installed on OS X by default from what I can gather. Mine doesn t try to use ssh-askpass at all, because I don t
                Message 7 of 7 , Aug 4, 2008
                • 0 Attachment
                  Louis wrote:
                  > On Aug 4, 10:06 am, Ben Schmidt <mail_ben_schm...@...> wrote:
                  >> Louis wrote:
                  >>> On Jul 8, 2:45 pm, Smitti <AdamSmyc...@...> wrote:
                  >>>> Opening a remote file, based on vim tip #337 (http://www.vim.org/tips/
                  >>>> tip.php?tip_id=337) does not seem to work. It works fine on the shell,
                  >>>> but UI does not ask for password and opens an empty temp file. Any
                  >>>> idea how to make it work?
                  >>>> I use latest snapshot 33.
                  >>> This is definitely a problem. I see the exact same symptoms using
                  >>> snapshot 33. None of the ssh-type commands work. Plain old ftp does
                  >>> work properly, though. But that's not what we want!
                  >>> This has nothing to do with what the other replies were saying about
                  >>> the double slash after the hostname. That's a separate thing. I have
                  >>> not tried other gvims, so I don't know if this is a MacVim issue or
                  >>> just a Vim7-gvim issue in general.
                  >>> Louis
                  >> Well, it behaves...differently...in gvim. It doesn't show a prompt, but
                  >> it 'freezes' and you can type in your password and push return and it
                  >> works.
                  >>
                  >> Can you confirm the contents of the buffer after this fails? I see the
                  >> standard netrw heading and then about three lines that say things along
                  >> the lines of 'authentication failed'. Do you see the same thing or
                  >> something different?
                  >
                  > I get an empty buffer trying to load a file. But if I try to load a
                  > directory, I get the netrw header and then...
                  >
                  > Permission denied (publickey,password,keyboard-interactive).
                  > Permission denied, please try again.
                  > Permission denied, please try again.
                  > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
                  > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
                  > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
                  >
                  > ... so there's the problem. MacVim depends on ssh-askpass, which, I
                  > gather is not a part of newer openssh distributions.
                  > I installed an X11-ssh-askpass, and it works, but you need to have X11
                  > installed :(
                  >
                  > It seems like gvim needs to have this functionality built-in, rather
                  > than depend on distribution-dependent paths for ssh-askpass
                  > and window-system dependent ssh-askpass implementations.

                  ssh-askpass is an X thing, and just not installed on OS X by default
                  from what I can gather. Mine doesn't try to use ssh-askpass at all,
                  because I don't have DISPLAY set in the environment I run MacVim in
                  (though I do have X running).

                  I think this bug answers an old question I had, though, and it may be
                  introduced by a fix I created for another bug... I will try to test that
                  theory in a few days and then devote my mind to how we might be able to
                  solve both simultaneously...

                  >> If you use public key cryptography rather than password authentication
                  >> and it will work without a password. This is fairly easy to set up;
                  >> there is documentation in the netrw help, but it is wrong, as I
                  >> explained in a recent thread.
                  >
                  > That'll be a fine workaround for the time being, but now I have to go
                  > do it!

                  Mmm. I find it's one of those nagging little tasks. It seems much bigger
                  than it actually is, and it's amazing how many times you type your
                  password before you get around to setting it up, and then wonder why you
                  didn't sooner. But then again, the more times you do it, the more
                  familiar you get with it; these days it's the first thing I do when I
                  get ssh access to any machine, or grant it to someone on mine; it only
                  takes me a few minutes, but it does make life easier!

                  Smiles,

                  Ben.



                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                Your message has been successfully submitted and would be delivered to recipients shortly.