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

Re: Can't open remote file on VimEnter

Expand Messages
  • glts
    ... Ah, the moment I sent this message I realized it must be because of the order in which VimEnter events are executed. So it has probably never worked and
    Message 1 of 7 , Jul 7, 2013
    • 0 Attachment
      On Sun, Jul 7, 2013 at 11:44 AM, glts <676c7473@...> wrote:
      > Trying to :read a remote file on VimEnter results in
      >
      > Error detected while processing VimEnter Auto commands for "*":
      > E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
      >
      > I used the following minimal vimrc with Vim 7.4a.
      >
      > filetype plugin indent on
      > autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
      >
      > This used to work in earlier versions of Vim/netrw but I haven't made
      > the effort to find out when this changed.
      >
      > Here is the --startuptime difference between the above invocation and an
      > invocation using -c 'read ...' instead of the VimEnter autocommand. The
      > second one works just fine.
      >
      > vim -Nu vimrc_vimenter
      >
      > ...
      > 034.199 000.360: opening buffers
      > 034.244 000.045: BufEnter autocommands
      > 034.247 000.003: editing files in windows
      > 1033.354 1000.107: VimEnter autocommands
      > 1033.361 000.007: before starting main loop
      > 1034.637 001.276: first screen update
      > 1034.642 000.005: --- VIM STARTED ---
      >
      >
      > vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
      >
      > ...
      > 031.423 000.314: opening buffers
      > 031.455 000.032: BufEnter autocommands
      > 031.457 000.002: editing files in windows
      > 037.291 005.720 005.720: sourcing /opt/share/vim/vim74a/autoload/netrw.vim
      > 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
      > 951.384 913.093: executing command arguments
      > 951.454 000.070: VimEnter autocommands
      > 951.457 000.003: before starting main loop
      > 1626.590 676.133: first screen update
      > 1626.596 000.006: --- VIM STARTED ---

      Ah, the moment I sent this message I realized it must be because of the
      order in which VimEnter events are executed.

      So it has probably never worked and I'm just misremembering. Sorry.

      --
      --
      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Tony Mechelynck
      ... Try defining that autocommand in a global after-plugin. That way, it will be defined after the plugin from netrwPlugin.vim. Example: on Unix:
      Message 2 of 7 , Jul 7, 2013
      • 0 Attachment
        On 07/07/13 12:07, glts wrote:
        > On Sun, Jul 7, 2013 at 11:44 AM, glts <676c7473@...> wrote:
        >> Trying to :read a remote file on VimEnter results in
        >>
        >> Error detected while processing VimEnter Auto commands for "*":
        >> E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
        >>
        >> I used the following minimal vimrc with Vim 7.4a.
        >>
        >> filetype plugin indent on
        >> autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
        >>
        >> This used to work in earlier versions of Vim/netrw but I haven't made
        >> the effort to find out when this changed.
        >>
        >> Here is the --startuptime difference between the above invocation and an
        >> invocation using -c 'read ...' instead of the VimEnter autocommand. The
        >> second one works just fine.
        >>
        >> vim -Nu vimrc_vimenter
        >>
        >> ...
        >> 034.199 000.360: opening buffers
        >> 034.244 000.045: BufEnter autocommands
        >> 034.247 000.003: editing files in windows
        >> 1033.354 1000.107: VimEnter autocommands
        >> 1033.361 000.007: before starting main loop
        >> 1034.637 001.276: first screen update
        >> 1034.642 000.005: --- VIM STARTED ---
        >>
        >>
        >> vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
        >>
        >> ...
        >> 031.423 000.314: opening buffers
        >> 031.455 000.032: BufEnter autocommands
        >> 031.457 000.002: editing files in windows
        >> 037.291 005.720 005.720: sourcing /opt/share/vim/vim74a/autoload/netrw.vim
        >> 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
        >> 951.384 913.093: executing command arguments
        >> 951.454 000.070: VimEnter autocommands
        >> 951.457 000.003: before starting main loop
        >> 1626.590 676.133: first screen update
        >> 1626.596 000.006: --- VIM STARTED ---
        >
        > Ah, the moment I sent this message I realized it must be because of the
        > order in which VimEnter events are executed.
        >
        > So it has probably never worked and I'm just misremembering. Sorry.
        >

        Try defining that autocommand in a global after-plugin. That way, it
        will be defined after the plugin from netrwPlugin.vim.

        Example:
        on Unix:
        ~/.vim/after/plugin/zzwrapup.vim
        on Windows:
        (in Windows terminology)
        %HOME%\vimfiles\after\plugin\zzwrapup\vim
        (in Vim terminology)
        ~/vimfiles/after/plugin/zzwrapup.vim

        The filename can be anything; the name I chose (near the end of the
        alphabet) tries to ensure that this plugin will be sourced not only
        after the ones in $VIMRUNTIME/plugin, but as the very last one of all
        global plugins.


        Best regards,
        Tony.
        --
        At Group L, Stoffel oversees six first-rate programmers, a managerial
        challenge roughly comparable to herding cats.
        -- The Washington Post Magazine, 9 June, 1985

        --
        --
        You received this message from the "vim_dev" 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_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Tony Mechelynck
        ... (of course) ... -- Love is a word that is constantly heard, Hate is a word that is not. Love, I am told, is more precious than gold. Love, I have read, is
        Message 3 of 7 , Jul 7, 2013
        • 0 Attachment
          On 07/07/13 13:02, Tony Mechelynck wrote:
          > On 07/07/13 12:07, glts wrote:
          >> On Sun, Jul 7, 2013 at 11:44 AM, glts <676c7473@...> wrote:
          >>> Trying to :read a remote file on VimEnter results in
          >>>
          >>> Error detected while processing VimEnter Auto commands for "*":
          >>> E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
          >>>
          >>> I used the following minimal vimrc with Vim 7.4a.
          >>>
          >>> filetype plugin indent on
          >>> autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
          >>>
          >>> This used to work in earlier versions of Vim/netrw but I haven't made
          >>> the effort to find out when this changed.
          >>>
          >>> Here is the --startuptime difference between the above invocation and an
          >>> invocation using -c 'read ...' instead of the VimEnter autocommand. The
          >>> second one works just fine.
          >>>
          >>> vim -Nu vimrc_vimenter
          >>>
          >>> ...
          >>> 034.199 000.360: opening buffers
          >>> 034.244 000.045: BufEnter autocommands
          >>> 034.247 000.003: editing files in windows
          >>> 1033.354 1000.107: VimEnter autocommands
          >>> 1033.361 000.007: before starting main loop
          >>> 1034.637 001.276: first screen update
          >>> 1034.642 000.005: --- VIM STARTED ---
          >>>
          >>>
          >>> vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
          >>>
          >>> ...
          >>> 031.423 000.314: opening buffers
          >>> 031.455 000.032: BufEnter autocommands
          >>> 031.457 000.002: editing files in windows
          >>> 037.291 005.720 005.720: sourcing
          >>> /opt/share/vim/vim74a/autoload/netrw.vim
          >>> 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
          >>> 951.384 913.093: executing command arguments
          >>> 951.454 000.070: VimEnter autocommands
          >>> 951.457 000.003: before starting main loop
          >>> 1626.590 676.133: first screen update
          >>> 1626.596 000.006: --- VIM STARTED ---
          >>
          >> Ah, the moment I sent this message I realized it must be because of the
          >> order in which VimEnter events are executed.
          >>
          >> So it has probably never worked and I'm just misremembering. Sorry.
          >>
          >
          > Try defining that autocommand in a global after-plugin. That way, it
          > will be defined after the plugin from netrwPlugin.vim.
          >
          > Example:
          > on Unix:
          > ~/.vim/after/plugin/zzwrapup.vim
          > on Windows:
          > (in Windows terminology)
          > %HOME%\vimfiles\after\plugin\zzwrapup\vim
          ------------------------------------------------^ OOPS: should be a dot
          (of course)
          > (in Vim terminology)
          > ~/vimfiles/after/plugin/zzwrapup.vim
          >
          > The filename can be anything; the name I chose (near the end of the
          > alphabet) tries to ensure that this plugin will be sourced not only
          > after the ones in $VIMRUNTIME/plugin, but as the very last one of all
          > global plugins.
          >
          >
          > Best regards,
          > Tony.
          --
          Love is a word that is constantly heard,
          Hate is a word that is not.
          Love, I am told, is more precious than gold.
          Love, I have read, is hot.
          But hate is the verb that to me is superb,
          And Love but a drug on the mart.
          Any kiddie in school can love like a fool,
          But Hating, my boy, is an Art.
          -- Ogden Nash

          --
          --
          You received this message from the "vim_dev" 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_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Bram Moolenaar
          ... See :help autocmd-nested. -- If an elephant is left tied to a parking meter, the parking fee has to be paid just as it would for a vehicle. [real standing
          Message 4 of 7 , Jul 7, 2013
          • 0 Attachment
            David Burgin wrote:

            > Trying to :read a remote file on VimEnter results in
            >
            > Error detected while processing VimEnter Auto commands for "*":
            > E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
            >
            > I used the following minimal vimrc with Vim 7.4a.
            >
            > filetype plugin indent on
            > autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
            >
            > This used to work in earlier versions of Vim/netrw but I haven't made
            > the effort to find out when this changed.
            >
            > Here is the --startuptime difference between the above invocation and an
            > invocation using -c 'read ...' instead of the VimEnter autocommand. The
            > second one works just fine.
            >
            > vim -Nu vimrc_vimenter
            >
            > ...
            > 034.199 000.360: opening buffers
            > 034.244 000.045: BufEnter autocommands
            > 034.247 000.003: editing files in windows
            > 1033.354 1000.107: VimEnter autocommands
            > 1033.361 000.007: before starting main loop
            > 1034.637 001.276: first screen update
            > 1034.642 000.005: --- VIM STARTED ---
            >
            >
            > vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
            >
            > ...
            > 031.423 000.314: opening buffers
            > 031.455 000.032: BufEnter autocommands
            > 031.457 000.002: editing files in windows
            > 037.291 005.720 005.720: sourcing /opt/share/vim/vim74a/autoload/netrw.vim
            > 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
            > 951.384 913.093: executing command arguments
            > 951.454 000.070: VimEnter autocommands
            > 951.457 000.003: before starting main loop
            > 1626.590 676.133: first screen update
            > 1626.596 000.006: --- VIM STARTED ---

            See :help autocmd-nested.

            --
            If an elephant is left tied to a parking meter, the parking fee has to be paid
            just as it would for a vehicle.
            [real standing law in Florida, United States of America]

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            You received this message from the "vim_dev" 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_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • glts
            ... Excellent, that solved the problem. Thanks! -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text
            Message 5 of 7 , Jul 7, 2013
            • 0 Attachment
              On Sun, Jul 7, 2013 at 1:07 PM, Bram Moolenaar <Bram@...> wrote:
              >
              > David Burgin wrote:
              >
              >> Trying to :read a remote file on VimEnter results in
              >>
              >> Error detected while processing VimEnter Auto commands for "*":
              >> E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
              >>
              >> I used the following minimal vimrc with Vim 7.4a.
              >>
              >> filetype plugin indent on
              >> autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
              >>
              >> This used to work in earlier versions of Vim/netrw but I haven't made
              >> the effort to find out when this changed.
              >>
              >> Here is the --startuptime difference between the above invocation and an
              >> invocation using -c 'read ...' instead of the VimEnter autocommand. The
              >> second one works just fine.
              >>
              >> vim -Nu vimrc_vimenter
              >>
              >> ...
              >> 034.199 000.360: opening buffers
              >> 034.244 000.045: BufEnter autocommands
              >> 034.247 000.003: editing files in windows
              >> 1033.354 1000.107: VimEnter autocommands
              >> 1033.361 000.007: before starting main loop
              >> 1034.637 001.276: first screen update
              >> 1034.642 000.005: --- VIM STARTED ---
              >>
              >>
              >> vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
              >>
              >> ...
              >> 031.423 000.314: opening buffers
              >> 031.455 000.032: BufEnter autocommands
              >> 031.457 000.002: editing files in windows
              >> 037.291 005.720 005.720: sourcing /opt/share/vim/vim74a/autoload/netrw.vim
              >> 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
              >> 951.384 913.093: executing command arguments
              >> 951.454 000.070: VimEnter autocommands
              >> 951.457 000.003: before starting main loop
              >> 1626.590 676.133: first screen update
              >> 1626.596 000.006: --- VIM STARTED ---
              >
              > See :help autocmd-nested.

              Excellent, that solved the problem. Thanks!

              --
              --
              You received this message from the "vim_dev" 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_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • glts
              On Sun, Jul 7, 2013 at 1:05 PM, Tony Mechelynck ... Sure thing. Thanks! -- -- You received this message from the vim_dev maillist. Do not top-post! Type your
              Message 6 of 7 , Jul 7, 2013
              • 0 Attachment
                On Sun, Jul 7, 2013 at 1:05 PM, Tony Mechelynck
                <antoine.mechelynck@...> wrote:
                > On 07/07/13 13:02, Tony Mechelynck wrote:
                >>
                >> On 07/07/13 12:07, glts wrote:
                >>>
                >>> On Sun, Jul 7, 2013 at 11:44 AM, glts <676c7473@...> wrote:
                >>>>
                >>>> Trying to :read a remote file on VimEnter results in
                >>>>
                >>>> Error detected while processing VimEnter Auto commands for "*":
                >>>> E484: Can't open file http://www.openssh.org/txt/rfc1349.txt
                >>>>
                >>>> I used the following minimal vimrc with Vim 7.4a.
                >>>>
                >>>> filetype plugin indent on
                >>>> autocmd VimEnter * read http://www.openssh.org/txt/rfc1349.txt
                >>>>
                >>>> This used to work in earlier versions of Vim/netrw but I haven't made
                >>>> the effort to find out when this changed.
                >>>>
                >>>> Here is the --startuptime difference between the above invocation and an
                >>>> invocation using -c 'read ...' instead of the VimEnter autocommand. The
                >>>> second one works just fine.
                >>>>
                >>>> vim -Nu vimrc_vimenter
                >>>>
                >>>> ...
                >>>> 034.199 000.360: opening buffers
                >>>> 034.244 000.045: BufEnter autocommands
                >>>> 034.247 000.003: editing files in windows
                >>>> 1033.354 1000.107: VimEnter autocommands
                >>>> 1033.361 000.007: before starting main loop
                >>>> 1034.637 001.276: first screen update
                >>>> 1034.642 000.005: --- VIM STARTED ---
                >>>>
                >>>>
                >>>> vim -Nu vimrc_minimal -c 'read http://www.openssh.org/txt/rfc1349.txt'
                >>>>
                >>>> ...
                >>>> 031.423 000.314: opening buffers
                >>>> 031.455 000.032: BufEnter autocommands
                >>>> 031.457 000.002: editing files in windows
                >>>> 037.291 005.720 005.720: sourcing
                >>>> /opt/share/vim/vim74a/autoload/netrw.vim
                >>>> 950.938 001.114 001.114: sourcing /opt/share/vim/vim74a/scripts.vim
                >>>> 951.384 913.093: executing command arguments
                >>>> 951.454 000.070: VimEnter autocommands
                >>>> 951.457 000.003: before starting main loop
                >>>> 1626.590 676.133: first screen update
                >>>> 1626.596 000.006: --- VIM STARTED ---
                >>>
                >>>
                >>> Ah, the moment I sent this message I realized it must be because of the
                >>> order in which VimEnter events are executed.
                >>>
                >>> So it has probably never worked and I'm just misremembering. Sorry.
                >>>
                >>
                >> Try defining that autocommand in a global after-plugin. That way, it
                >> will be defined after the plugin from netrwPlugin.vim.
                >>
                >> Example:
                >> on Unix:
                >> ~/.vim/after/plugin/zzwrapup.vim
                >> on Windows:
                >> (in Windows terminology)
                >> %HOME%\vimfiles\after\plugin\zzwrapup\vim
                >
                > ------------------------------------------------^ OOPS: should be a dot (of
                > course)
                >
                >> (in Vim terminology)
                >> ~/vimfiles/after/plugin/zzwrapup.vim
                >>
                >> The filename can be anything; the name I chose (near the end of the
                >> alphabet) tries to ensure that this plugin will be sourced not only
                >> after the ones in $VIMRUNTIME/plugin, but as the very last one of all
                >> global plugins.

                Sure thing. Thanks!

                --
                --
                You received this message from the "vim_dev" 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_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.