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

netrw troubles

Expand Messages
  • rameo
    I have found an error in netrw plugin why I can t go inside some directories. I always receive this message in these directories (using t ): Not a regular
    Message 1 of 6 , Mar 3, 2010
    • 0 Attachment
      I have found an error in netrw plugin why I can't go inside some
      directories.

      I always receive this message in these directories (using "t"):

      Not a regular file^M


      After testing and trying I found the reason:
      every ftp directory without an ending "trailing slash" gives this
      error.

      so...

      public_html/my-directory ---> above error
      public_html/my-directory/ ---> ok

      How can I resolve this problem?

      ----------------------------------
      then there is a little (I suppose vim) error after sending a command
      (2 lines):
      "My FTP command" "--No lines in buffer--
      "My FTP command" "--No lines in buffer--
      Press ENTER or type command to continue

      --
      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
    • rameo
      Hi Chip, Thank you for writing. Yes the set ch=2 command removed the message Press ENTER or type command to continue . (but .... I don t like the big command
      Message 2 of 6 , Mar 4, 2010
      • 0 Attachment
        Hi Chip,

        Thank you for writing.

        Yes the set ch=2 command removed the message
        "Press ENTER or type command to continue".
        (but .... I don't like the big command line)

        The trailing slash:
        The server is a a linux server. No not an old server.
        There is no way to resolve this problem?
        A command which indicates to netrw if something is a file or directory
        p.e.
        td (=directory)
        tf (=file)

        Btw no problems in ftp client.
        Isn't browsing with netrw using a ftp client possible?

        A question about security
        Every time when there is a read/write/browse command the username +
        password is been sent (not encrypted) over the net. Isn't that
        insecure?
        No such problems in ftp client isn't it?

        Regards,
        Rameo

        --
        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
      • Charles Campbell
        ... IIUC you ve done something like vim ftp://somehost/some/path/ and have gotten a directory listing. You re having a problem in that directories are
        Message 3 of 6 , Mar 4, 2010
        • 0 Attachment
          rameo wrote:
          > Hi Chip,
          >
          > Thank you for writing.
          >
          > Yes the set ch=2 command removed the message
          > "Press ENTER or type command to continue".
          > (but .... I don't like the big command line)
          >
          > The trailing slash:
          > The server is a a linux server. No not an old server.
          > There is no way to resolve this problem?
          > A command which indicates to netrw if something is a file or directory
          > p.e.
          > td (=directory)
          > tf (=file)
          >

          IIUC you've done something like vim ftp://somehost/some/path/ and
          have gotten a directory listing. You're having a problem in that
          directories are not being listed with trailing "/"s, thus when you type
          a "t" with the cursor atop one of these netrw is not browsing, its
          attempting to do a file transfer. The way to resolve this problem is to
          find out why you're not getting that trailing slash -- read :help
          netrw-debug and maybe we can find out what's happening. I suggest that
          if you wish to send me a copy of the trace that you do so directly
          rather than flooding the mailing list with it (and remove any passwords
          that may show up in it first, please).
          > Btw no problems in ftp client.
          > Isn't browsing with netrw using a ftp client possible?
          >
          > A question about security
          > Every time when there is a read/write/browse command the username +
          > password is been sent (not encrypted) over the net. Isn't that
          > insecure?
          > No such problems in ftp client isn't it?
          >

          ftp is inherently an insecure protocol. If you have sniffers on the
          line it doesn't much matter if they get your password once or five
          times. My advice is: if you want security, switch to scp. Of course, I
          realize that you may not have any choice in the matter as many sites
          only offer ftp access -- which is a great boon to the online criminal
          element, I'm sure.

          Regards,
          Chip Campbell

          --
          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
        • Charles E Campbell Jr
          ... The problem appears to be that you re not getting the trailing slashes (see :help netrw-dirlist). The trailing slash indicates to netrw that a directory
          Message 4 of 6 , Mar 4, 2010
          • 0 Attachment
            rameo wrote:
            > I have found an error in netrw plugin why I can't go inside some
            > directories.
            >
            > I always receive this message in these directories (using "t"):
            >
            > Not a regular file^M
            >
            >
            > After testing and trying I found the reason:
            > every ftp directory without an ending "trailing slash" gives this
            > error.
            >
            > so...
            >
            > public_html/my-directory ---> above error
            > public_html/my-directory/ ---> ok
            >
            > How can I resolve this problem?
            >

            The problem appears to be that you're not getting the trailing slashes
            (see :help netrw-dirlist). The trailing slash indicates to netrw that a
            directory listing rather than a file transfer is wanted. Remote
            directory listings should have slashes for directories; if you're having
            problems in not having that trailing slash, then there's either an odd
            ftp client or a server. To track down such a problem -- see :help
            netrw-debug. Is it a M$ server?
            > ----------------------------------
            > then there is a little (I suppose vim) error after sending a command
            > (2 lines):
            > "My FTP command" "--No lines in buffer--
            > "My FTP command" "--No lines in buffer--
            > Press ENTER or type command to continue
            >

            Try :set ch=2 or :set ch=3 and see if that helps. The "No lines in
            buffer" message is issued by vim before netrw gets invoked, so netrw
            can't do anything about them.

            Regards,
            Chip Campbell


            --
            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
          • Tony Mechelynck
            ... [...] ... [...] Personally I get the slashes, except for softlinks to directories. In that case the server sends a line like (e.g. for the entry for
            Message 5 of 6 , May 1, 2010
            • 0 Attachment
              On 05/03/10 01:35, Charles E Campbell Jr wrote:
              > rameo wrote:
              [...]
              >> How can I resolve this problem?
              >
              > The problem appears to be that you're not getting the trailing slashes
              > (see :help netrw-dirlist). The trailing slash indicates to netrw that a
              > directory listing rather than a file transfer is wanted. Remote
              > directory listings should have slashes for directories; if you're having
              > problems in not having that trailing slash, then there's either an odd
              > ftp client or a server. To track down such a problem -- see :help
              > netrw-debug. Is it a M$ server?
              [...]

              Personally I get the slashes, except for softlinks to directories. In
              that case the server sends a line like (e.g. for the entry for
              "mozilla.org" in the pub/ directory of ftp.mozilla.org):

              lrwxrwxrwx 1 ftp ftp 1 Sep 14 2006 mozilla.org -> .

              but netrw (in "long" listing mode) changes that to

              mozilla.org lrwxrwxrwx 1 ftp ftp 1 Sep 14 2006

              removing the ' -> ' and all that follows it. I can still see that that
              line is for a link (by the l as initial permission), but netrw doesn't
              tell me what it links to. Also, when sorting by name, the link is not
              segregated to the top of the list, even when directories are.

              BTW I'm still getting "Invalid command", the first time only, when
              browsing a directory. As a workaround I immediately use ":view" (with no
              quotes and no aguments) to get the listing. (Could that be related to
              the fact that no username/password is required, even though the server
              asks for it with a 331 message after the motd? I have a .netrc file.)

              A few days ago I got disconnected from the other end (36-hour silent
              ADSL connection expiration from my ISP); netrw could not go on browsing
              the same site (after reconnecting the ADSL interface). I had to browse a
              different FTP server and come back before netrw could go on browsing the
              "interrupted" one. How do I get netrw to "reopen" the current server and
              directory?


              Best regards,
              Tony.
              --
              You know you have a small apartment when Rice Krispies echo.
              -- S. Rickly Christian

              --
              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
            • Tony Mechelynck
              On 03/05/10 16:16, Charles Campbell wrote: [...] ... Other than getting the directory entry for whatever the link points to, recursively, which would probably
              Message 6 of 6 , May 3, 2010
              • 0 Attachment
                On 03/05/10 16:16, Charles Campbell wrote:
                [...]
                > I'm sure I could get netrw to make "-> ." into a "/", thereby making it
                > treat such links as directories. However, I'm not at all sure that "->
                > something" is always a directory -- and I don't really see a simple way
                > to know whether the target is a file or directory. Suggestions?
                >
                > Regards,
                > Chip Campbell
                >
                >

                Other than getting the directory entry for whatever the link points to,
                recursively, which would probably be unacceptable in terms of
                performance, I don't have any.

                Or maybe "following the link" but only if and when the user hits <Enter>
                or o on it, to see /then/ if it's a "file", a "directory" or a further
                link to be followed? (IIRC, in "short" mode links have an @ suffix. Or
                do they?)


                Best regards,
                Tony.
                --
                Be careful of reading health books, you might die of a misprint.
                -- Mark Twain

                --
                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
              Your message has been successfully submitted and would be delivered to recipients shortly.