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

Re: rtp hacks, sourcing after/*

Expand Messages
  • Marc Weber
    Hi Gary, ... please try quoting only the important parts of a message. ... Let s keep it short and sipmle. Try this: mv .vim .other ... Now it should behave
    Message 1 of 9 , May 27, 2013
    • 0 Attachment
      Hi Gary,

      > [ many lines ]
      please try quoting only the important parts of a message.

      > > Otherwise you'd find messages with the id "test-plugin" in addition to
      > > "standard".
      >
      > But I see them in the output of :scriptnames:
      >
      > [..]
      > 19: ~/.vim/after/plugin/html.vim
      > 21: ~/.vim/after/ftplugin/html.vim

      Let's keep it short and sipmle. Try this:

      mv .vim .other

      then in your .vimrc add a early line like this:

      :set rtp=~/.other

      Now it should behave "normal", because you told Vim where your .vim
      directory is. Try it and report whether those after files can still be
      found in :scriptnames. Same applies to ftdetect

      Got it?

      Marc Weber

      --
      --
      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.
    • Gary Johnson
      ... It depends what you mean by normal . It will look in ~/.other for a number of files and directories, but not for the after directory. If you want it to
      Message 2 of 9 , May 27, 2013
      • 0 Attachment
        On 2013-05-27, Marc Weber wrote:

        > Let's keep it short and sipmle. Try this:
        >
        > mv .vim .other
        >
        > then in your .vimrc add a early line like this:
        >
        > :set rtp=~/.other
        >
        > Now it should behave "normal", because you told Vim where your .vim
        > directory is.

        It depends what you mean by "normal". It will look in ~/.other for
        a number of files and directories, but not for the after directory.
        If you want it to look in ~/.other/after you'll have to include that
        in 'rtp' as well.

        :set rtp=~/.other,~/.other/after

        That is how you tell Vim to look there _after_ it sources from the
        directories ahead of the after files in 'rtp'.

        I know you know all that, but it seems pretty clear to me that that
        behavior is by design. I don't see the problem. Maybe you just
        haven't made it short and simple enough for me.

        > Try it and report whether those after files can still be
        > found in :scriptnames. Same applies to ftdetect

        Of course the after files are not there--you didn't include them in
        'rtp'.

        The ftdetect files are not there because they're sourced by
        $VIMRUNTIME/filetype.vim. So if you included at least $VIMRUNTIME,
        your 'rtp' would behave more as "normal", e.g.,

        :set rtp=~/.other,$VIMRUNTIME,~/.other/after

        With $VIMRUNTIME in your 'rtp', any files in <package>/ftdetect
        should be sourced upon ":filetype on" as long as 'rtp' includes
        <package>.

        > Got it?

        Apparently not. I guess there are other ways that Vim could manage
        plugins, but I don't see a problem with the current method.

        I'll re-read your earlier messages and see if I can possibly grasp
        the less-simple example.

        Regards,
        Gary

        --
        --
        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.
      • Marc Weber
        ... The problem was me - not vim - not you. Don t ask me why I thought after was magic, apparently its not. I should have known it - but didn t see it. Marc
        Message 3 of 9 , May 27, 2013
        • 0 Attachment
          Excerpts from Gary Johnson's message of Tue May 28 02:21:24 +0200 2013:
          > Apparently not. I guess there are other ways that Vim could manage
          > plugins, but I don't see a problem with the current method.
          The problem was me - not vim - not you.
          Don't ask me why I thought "after" was magic, apparently its not.
          I should have known it - but didn't see it.

          Marc Weber

          --
          --
          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.
        • Gary Johnson
          ... I would expect the ftdetect files from the plugin to not be sourced because the plugin wasn t added to rtp until after the sourcing was done by the
          Message 4 of 9 , May 27, 2013
          • 0 Attachment
            On 2013-05-27, Marc Weber wrote:

            > You'll notice that the ftdetect files and the after files from the
            > plugin were not sourced.

            I would expect the ftdetect files from the plugin to not be sourced
            because the plugin wasn't added to 'rtp' until after the sourcing
            was done by the :filetype command. That's an error in your ~/.vimrc
            file that can easily be fixed by putting the 'rtp' setting ahead of
            the :filetype command.

            As I wrote in an earlier reply, the after files from the plugin
            aren't sourced because you didn't include them in the 'rtp'. That's
            easily fixed with

            :set rtp+=~/A,~/A/after

            Possibly better would be

            :set rtp^=~/A
            :set rtp+=~/A/after

            in case a plugin file needed to take the place of a $VIMRUNTIME
            file.

            With those two issues understood, it should be pretty easy to get
            your plugin manager thingy working.

            Regards,
            Gary

            --
            --
            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.