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

RE: netrw v103b - No longer can browse directories

Expand Messages
  • David Fishburn
    ... I am having a similar issue, but I am using 102 from the main Vim website: http://www.vim.org/scripts/script.php?script_id=1075 ... I don t like modifying
    Message 1 of 11 , Aug 1, 2006
    • 0 Attachment
      > On Tue 1-Aug-06 1:52am -0600, Hugo Ahlenius wrote:
      >
      > > I just upgraded netrw to netrw 103b from Charles Campbell's
      > web-site.
      > > Now it seems like opening a directory by just trying to edit it
      > > doesn't work, like it used to:
      > > :e c:\

      I am having a similar issue, but I am using 102 from the main Vim website:
      http://www.vim.org/scripts/script.php?script_id=1075


      ...
      > If so, either remove it (all 6 files) or make the following
      > change to $vim\plugin\netrwPlugin.vim:
      >
      > Replace (right after the "Load Once" line):
      >
      > if exists("g:loaded_netrw")
      > finish
      > endif
      >
      > with:
      >
      > if exists("g:loaded_netrwPlugin")
      > finish
      > endif
      > let g:loaded_netrwPlugin = 1


      I don't like modifying files in the $VIM directory.

      I tried this and it still did not fix the problem on my machine (I still
      cannot browse the files in my directory).

      I also get this:
      :pwd
      C:\

      :e .
      "C:\" Illegal file name


      Dave
    • Charles E Campbell Jr
      ... Please remove all the older versions of netrw prior to installing the latest versions of netrw. The Illegal file name message comes up before netrw has
      Message 2 of 11 , Aug 1, 2006
      • 0 Attachment
        David Fishburn wrote:

        >I don't like modifying files in the $VIM directory.
        >
        >I tried this and it still did not fix the problem on my machine (I still
        >cannot browse the files in my directory).
        >
        >I also get this:
        >:pwd
        >C:\
        >
        >:e .
        >"C:\" Illegal file name
        >
        >
        Please remove all the older versions of netrw prior to installing the
        latest versions of netrw.

        The "Illegal file name" message comes up before netrw has anything to do
        with handling it.
        However, I see that there's an unwanted "Press ENTER..." prompt. I want
        to get rid of that;
        if there's some ideas on this, please let me know.

        Regards,
        Chip Campbell
      • Hugo Ahlenius
        Hi Charles, Thanks for the response, I have just updated vimball + netrw again... ... This is still a problem under windows/non-cygwin (I haven t tried under
        Message 3 of 11 , Aug 2, 2006
        • 0 Attachment
          Hi Charles,

          Thanks for the response, I have just updated vimball + netrw again...

          | >* URLs with question marks in them, like
          | >http://www.grida.no/products.cfm?pageID=13
          | I just tried it; this appears to work (under linux). Is there still a
          | problem with windows/cygwin?

          This is still a problem under windows/non-cygwin (I haven't tried under
          cygwin). I get "E480: No match[...]"

          | >* FTP listings from a windows ftp server
          | I think the current version addresses this.

          I just tried, and it doesn't seem like that. MS Windows IIS/ftp server
          return a non-standard directory listing by default (can be set to do a
          unix-type dir listing), and netrw is not parsing them properly. This should
          be easy to test, one just needs to start up the ftp service on a windows
          machine to see this...

          | >* a http url with a trailing slash starts an ftp session, like
          | >http://maps.grida.no/arctic/
          | The trailing slash indicates to netrw that its supposed to be handling
          | a directory. Netrw only supports two methods for browsing
          | directories: ftp and ssh. If the file transfer protocol is either http
          | or ftp, then ftp is used (for browsing). If the file transfer
          | protocol is anything else, then ssh is used. Attempts to use wget or
          | curl (two of the programs used to handle http://... ) doesn't yield a
          | listing.
          | Perhaps you want netrw to attach an "index.html" automatically?

          The "http" prefix should tell that this is a URL that should be retrieved
          using the http protocol and nothing else. A URL with a trailing slash is
          still a fully valid URL, and doesn't not signify directories or anything
          like that on the www. I would really like netrw to just pass any
          http-prefixed URLs directly to curl/wget, and definately not attaching
          anything to them! :)

          Cheers and thanks,
          Hugo

          --
          Hugo Ahlenius
          fraxinus (at) oxel.net
          http://www.oxel.net
        • A.J.Mechelynck
          ... IIUC, when an http: URL ends in a slash, or when it names a directory even without a slash, the server retrieves the default page (if any) in the directory
          Message 4 of 11 , Aug 2, 2006
          • 0 Attachment
            Hugo Ahlenius wrote:
            > Hi Charles,
            >
            > Thanks for the response, I have just updated vimball + netrw again...
            >
            > | >* URLs with question marks in them, like
            > | >http://www.grida.no/products.cfm?pageID=13
            > | I just tried it; this appears to work (under linux). Is there still a
            > | problem with windows/cygwin?
            >
            > This is still a problem under windows/non-cygwin (I haven't tried under
            > cygwin). I get "E480: No match[...]"
            >
            > | >* FTP listings from a windows ftp server
            > | I think the current version addresses this.
            >
            > I just tried, and it doesn't seem like that. MS Windows IIS/ftp server
            > return a non-standard directory listing by default (can be set to do a
            > unix-type dir listing), and netrw is not parsing them properly. This should
            > be easy to test, one just needs to start up the ftp service on a windows
            > machine to see this...
            >
            > | >* a http url with a trailing slash starts an ftp session, like
            > | >http://maps.grida.no/arctic/
            > | The trailing slash indicates to netrw that its supposed to be handling
            > | a directory. Netrw only supports two methods for browsing
            > | directories: ftp and ssh. If the file transfer protocol is either http
            > | or ftp, then ftp is used (for browsing). If the file transfer
            > | protocol is anything else, then ssh is used. Attempts to use wget or
            > | curl (two of the programs used to handle http://... ) doesn't yield a
            > | listing.
            > | Perhaps you want netrw to attach an "index.html" automatically?
            >
            > The "http" prefix should tell that this is a URL that should be retrieved
            > using the http protocol and nothing else. A URL with a trailing slash is
            > still a fully valid URL, and doesn't not signify directories or anything
            > like that on the www. I would really like netrw to just pass any
            > http-prefixed URLs directly to curl/wget, and definately not attaching
            > anything to them! :)
            >
            > Cheers and thanks,
            > Hugo
            >
            > --
            > Hugo Ahlenius
            > fraxinus (at) oxel.net
            > http://www.oxel.net
            >
            >
            >
            >
            >

            IIUC, when an http: URL ends in a slash, or when it names a directory
            even without a slash, the server retrieves the default page (if any) in
            the directory in question; and it is up to the server to determine what
            this default page shall be. On user sites of my ISP, the default page is
            one of index.htm, INDEX.HTM, index.html or INDEX.HTML, whichever is
            present, or if none is, a server page saying "The page you are trying to
            access is not present on this server" with the ISP logo and
            blue-and-white color scheme; but I've seen other sites where the default
            page is named index.php, default.html, ... You never get a directory
            listing unless the default page itself includes a directory listing
            (e.g., at http://ftp.vim.org/pub/vim/patches/7.0/ you get the contents
            of the README file _plus_ a directory listing in HTML).

            I don't know if this could raise problems with netrw, and of what kind.


            Best regards,
            Tony.
          • Hugo Ahlenius
            ... Yep. It is all up to the server, the http protocol doesn t really recognize concepts such as directories or files, it is URLs. A trailing slash could
            Message 5 of 11 , Aug 2, 2006
            • 0 Attachment
              | -----Original Message-----
              | From: A.J.Mechelynck [mailto:antoine.mechelynck@...]
              | IIUC, when an http: URL ends in a slash, or when it names a directory
              | even without a slash, the server retrieves the default page (if any)
              | in the directory in question; and it is up to the server to determine
              | what this default page shall be. On user sites of my ISP, the default
              | page is one of index.htm, INDEX.HTM, index.html or INDEX.HTML,
              | whichever is present, or if none is, a server page saying "The page
              | you are trying to access is not present on this server" with the ISP
              | logo and blue-and-white color scheme; but I've seen other sites where
              | the default page is named index.php, default.html, ... You never get a
              | directory listing unless the default page itself includes a directory
              | listing (e.g., at http://ftp.vim.org/pub/vim/patches/7.0/ you get the
              | contents of the README file _plus_ a directory listing in HTML).

              Yep. It is all up to the server, the http protocol doesn't really recognize
              concepts such as directories or files, it is URLs. A trailing slash could
              return a 30x redirect to a file (such as index|default.xxx) or return a html
              web-page. That page, might look like a directory listing, as that
              ftp.vim.org example - but the client or the protocol doesn't recognize it as
              anything other than a normal http request...

              /Hugo
            • Charles E Campbell Jr
              ... Hmm, well using your example (http://www.grida.no/arctic/) both curl and wget yield an empty file. Regards, Chip Campbell
              Message 6 of 11 , Aug 2, 2006
              • 0 Attachment
                Hugo Ahlenius wrote:

                >The "http" prefix should tell that this is a URL that should be retrieved
                >using the http protocol and nothing else. A URL with a trailing slash is
                >still a fully valid URL, and doesn't not signify directories or anything
                >like that on the www. I would really like netrw to just pass any
                >http-prefixed URLs directly to curl/wget, and definately not attaching
                >anything to them! :)
                >
                Hmm, well using your example (http://www.grida.no/arctic/) both curl and wget
                yield an empty file.

                Regards,
                Chip Campbell
              • Hugo Ahlenius
                ... Maybe that was a very bad example, if you look at the headers in curl, that yields a 302 redirect and not an empty page (which should be a 404) - my wget
                Message 7 of 11 , Aug 2, 2006
                • 0 Attachment
                  |Hmm, well using your example (http://www.grida.no/arctic/) both curl
                  |and wget yield an empty file.

                  Maybe that was a very bad example, if you look at the headers in curl, that
                  yields a 302 redirect and not an empty page (which should be a 404) - my
                  wget follows that redirect (there might be a switch for curl to do that as
                  well). Try something else:
                  http://mysite.verizon.net/astronaut/vim/
                  http://maps.grida.no/
                  http://vim.sourceforge.net/scripts/

                  (all these return a 200 code, and html)

                  :)

                  /Hugo
                Your message has been successfully submitted and would be delivered to recipients shortly.