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

Trouble with ftp directory browsing in Linux using netrw

Expand Messages
  • Manas Karekar
    I asked this on ubuntuforums to no avail. I hope someone here could point me in the right direction. If no solution exists, I m willing to work on one. My
    Message 1 of 4 , Feb 20, 2013
    • 0 Attachment
      I asked this on ubuntuforums to no avail. I hope someone here could
      point me in the right direction.

      If no solution exists, I'm willing to work on one.

      My problem is as follows:

      Environment:
      - Lubuntu 12.10 (64), also Lubuntu 12.04 (64), Ubuntu 12.04 (64),
      Linux Mint 13 (64).
      - LXterminal, UXTerm and gnome-terminal
      - GVim/Vim 7.3.547, 7.3.429
      - both passive and active ftp
      - a local ftp server using filezilla and http://secureftp-test.com/ to
      test it.

      When I try to access a remote ftp directory, I can only open the
      directory that I typed in a path to. As soon as I navigate through the
      listed directories and hit enter on any, the screen splits into two
      horizontal panes and the top pane reads "File not found".

      I tried this from Windows 7 Gvim/Vim (don't have the version handy but
      it was 7.3+) and it worked as expected.

      From what I gather it just doesn't seem to look for the right
      directory after I hit enter in the list I think. Maybe it skips an
      extra forward slash somewhere or something?

      I can't seem to figure out what the issue is. I am going to try
      running the same thing off of an Ubuntu and Mint Live CD and see if it
      persists.

      If so, sadly I'm going to have to either replace Lubuntu or look at
      remote editing alternatives to ftp.

      I tried installing different versions of netrw, fresh vim installs,
      many live CD variants of debian based distros but with the absolute
      same result.


      The only reason I presume I'm not chasing smoke is because this thing
      works under windows 7 like a charm. And I doubt it's a 'windows
      handles this in a non conventional way' sort of a thing as its
      supposed to be the expected behavior.


      As an aside, the reason why I'm so hellbent on finding a solution is
      because at work, we use a Linux host and ftp into Windows Virtual
      Machines and edit files residing on the vm.

      Everyone uses jEdit, whose ftp plugin, I might add, is epic. I'm a
      huge fan of jEdit, but I've just been getting addicted to vim more and
      more over time and now I can't do without it.

      Help please!

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Tony Mechelynck
      ... [...] Try hitting Ctrl-L in the bottom pane after that message appears. Vim should then retry the directory read and might succeed. Also, if you have set
      Message 2 of 4 , Feb 20, 2013
      • 0 Attachment
        On 20/02/13 18:03, Manas Karekar wrote:
        > I asked this on ubuntuforums to no avail. I hope someone here could
        > point me in the right direction.
        >
        > If no solution exists, I'm willing to work on one.
        >
        > My problem is as follows:
        >
        > Environment:
        > - Lubuntu 12.10 (64), also Lubuntu 12.04 (64), Ubuntu 12.04 (64),
        > Linux Mint 13 (64).
        > - LXterminal, UXTerm and gnome-terminal
        > - GVim/Vim 7.3.547, 7.3.429
        > - both passive and active ftp
        > - a local ftp server using filezilla and http://secureftp-test.com/ to
        > test it.
        >
        > When I try to access a remote ftp directory, I can only open the
        > directory that I typed in a path to. As soon as I navigate through the
        > listed directories and hit enter on any, the screen splits into two
        > horizontal panes and the top pane reads "File not found".
        [...]

        Try hitting Ctrl-L in the bottom pane after that message appears. Vim
        should then retry the directory read and might succeed.

        Also, if you have set 'autochdir', try toggling it off.

        Make sure there is a slash at the end of directory names in the first
        directory listing. If there isn't, that's why Vim cannot read the
        subdirectories. You might then try

        :e ^R%/

        (where ^R means "hit Ctrl-R") after the command fails, to append a / to
        the directory name.


        Best regards,
        Tony.
        --
        Dogs must have a permit signed by the mayor in order to congregate in groups
        of three or more on private property.
        [real standing law in Oklahoma, United States of America]

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • manaskarekar
        Adding the trailing slash after the failing to open directory works! Thanks a ton! Is there a way to automate the command ... to apply to all listed
        Message 3 of 4 , Feb 20, 2013
        • 0 Attachment
          Adding the trailing slash after the failing to open directory works!

          Thanks a ton! Is there a way to automate the command

          :e ^R%/

          to apply to all listed directories while navigating a tree using netrw?

          Could I write a function that would check for any directories listed in the
          current buffer and append '/' to each. That way I can navigate from one
          directory to the other without having to type it out each time.

          Is this some thing I can tweak in .vimrc or would I have to mess around with
          netrw?

          Any help appreciated, thank you!



          --
          View this message in context: http://vim.1045645.n5.nabble.com/Trouble-with-ftp-directory-browsing-in-Linux-using-netrw-tp5713967p5713980.html
          Sent from the Vim - General mailing list archive at Nabble.com.

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Charles Campbell
          ... Hello! ... to mark all directories in the current directory. That s not the same as all the files showing in a tree listing. However, one could then type
          Message 4 of 4 , Mar 18, 2014
          • 0 Attachment
            manaskarekar wrote:
            > Adding the trailing slash after the failing to open directory works!
            >
            > Thanks a ton! Is there a way to automate the command
            >
            > :e ^R%/
            >
            > to apply to all listed directories while navigating a tree using netrw?
            >
            > Could I write a function that would check for any directories listed in the
            > current buffer and append '/' to each. That way I can navigate from one
            > directory to the other without having to type it out each time.
            >
            > Is this some thing I can tweak in .vimrc or would I have to mess around with
            > netrw?
            >
            > Any help appreciated, thank you!
            >
            Hello!

            With netrw v151k, while in a netrw buffer, you could:

            :MF */

            to mark all directories in the current directory. That's not the same
            as all the files showing in a tree listing. However, one could then
            type "me" to use the marked-file edit capability.

            Regards,
            Chip Campbell

            P.S. netrw v151k is available from my website:
            http://www.drchip.org/astronaut/vim/index.html#NETRW

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          Your message has been successfully submitted and would be delivered to recipients shortly.