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

netrw v103b

Expand Messages
  • Hugo Ahlenius
    Hi, 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
    Message 1 of 11 , Jul 31, 2006
    View Source
    • 0 Attachment
      Hi,

      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:\

      Could there be an autocommand that is missing? The only message I get is
      "Illegal file name". Browsing directories works through the "Explore"
      command though.

      (I am on gvim 7.0 on WinXP, non-cygwin)

      Charles -- if you read this, here are some things that are still outstanding
      -- do you have any plans to fix these?

      * URLs with question marks in them, like
      http://www.grida.no/products.cfm?pageID=13
      * FTP listings from a windows ftp server
      * a http url with a trailing slash starts an ftp session, like
      http://maps.grida.no/arctic/


      --
      Hugo Ahlenius
      fraxinus (at) oxel.net
      http://www.oxel.net
    • Bill McCarthy
      ... I have the same setup and had a similar problem after installing the new releases to $vim vimfiles or ~ vimfiles. Do you still have the distribution copy
      Message 2 of 11 , Aug 1, 2006
      View Source
      • 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:\
        >
        > Could there be an autocommand that is missing? The only message I get is
        > "Illegal file name". Browsing directories works through the "Explore"
        > command though.
        >
        > (I am on gvim 7.0 on WinXP, non-cygwin)

        I have the same setup and had a similar problem after
        installing the new releases to $vim\vimfiles or ~\vimfiles.

        Do you still have the distribution copy of netrw v98
        installed to $vimruntime?

        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

        --
        Best regards,
        Bill
      • Hugo Ahlenius
        ... Yes I had -- your change did it! Thanks, Hugo
        Message 3 of 11 , Aug 1, 2006
        View Source
        • 0 Attachment
          | Do you still have the distribution copy of netrw v98 installed to
          | $vimruntime?

          Yes I had -- your change did it!

          Thanks,
          Hugo
        • Charles E Campbell Jr
          ... Be sure to remove all previous installations of netrw. The current version (v103c as of last night) and subsequent vim distributions should no longer have
          Message 4 of 11 , Aug 1, 2006
          View Source
          • 0 Attachment
            Hugo Ahlenius wrote:

            >Hi,
            >
            >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:\
            >
            >Could there be an autocommand that is missing? The only message I get is
            >"Illegal file name". Browsing directories works through the "Explore"
            >command though.
            >
            >

            Be sure to remove all previous installations of netrw. The current
            version (v103c as of last night)
            and subsequent vim distributions should no longer have this problem.
            After removal of all previous
            installations of netrw, in particular the netrw that is made available
            from the standard vim distribution,
            then do a netrw install.

            Also: there's been a small change in vimballs; you'll need the latest
            vimball plugin to handle it properly.
            The vimball v18a is backwards compatible -- ie. it can read older
            vimballs, but v17 and earlier vimball
            will have trouble with the newer vimballs.

            >Charles -- if you read this, here are some things that are still outstanding
            >-- do you have any plans to fix these?
            >
            >* 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?

            >* FTP listings from a windows ftp server
            >
            >
            I think the current version addresses 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?

            Regards,
            Chip Campbell
          • 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 5 of 11 , Aug 1, 2006
            View Source
            • 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 6 of 11 , Aug 1, 2006
              View Source
              • 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 7 of 11 , Aug 2, 2006
                View Source
                • 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 8 of 11 , Aug 2, 2006
                  View Source
                  • 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 9 of 11 , Aug 2, 2006
                    View Source
                    • 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 10 of 11 , Aug 2, 2006
                      View Source
                      • 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 11 of 11 , Aug 2, 2006
                        View Source
                        • 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.