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

Re: vim60h: 'vim -u vimrc' => no plugins ??

Expand Messages
  • Zdenek Sekera
    ... I disagree. In fact, I have several .vimrc for 5.7, different for different projects (found it easier to maintain than trying to ifdef things inside one
    Message 1 of 12 , Sep 14, 2000
    • 0 Attachment
      Michael Geddes wrote:
      >
      > I see the way -u is used is more for loading a small set of macros for
      > executing over a particular set of files. I wouldn't invisage using -u
      > vimrc -u .vimrc normally.

      I disagree. In fact, I have several .vimrc for 5.7, different for
      different
      projects (found it easier to maintain than trying to ifdef things inside
      one depending on some $PROJECT variable) and calling different vim
      aliases
      to get the version I want. So why shouldn't I be allowed to do the same
      for
      6.0? More: for every testing of a problem/feature, I find very useful to
      be able to reduce .vimrc to a bare minimum and do vim -u
      .vimrctestversion
      to check it out. That may be out of question for 6.0.....

      I think that limitation for not loading plugin when '-u' is used should
      go
      away. As I said before I don't understand at all why it is there. In my
      'moments of niceness' :-) I tend to think there is bug in the doc and it
      should say 'when -u NONE is used'. That would seem logical.

      > In this case, why not get your version 5 .vimrc to check the version and
      > load your version 6 .vimrc.

      Well, my .vimrc is ~1500 lines. I am using the occassion of 6.0 to clean
      that
      up and shorten it, which is unlikely to happen if I start adding
      ifdef's...:-)
      Anyway, I thought of that as an option when 60a came up and took a deep
      breath
      when I realized the (possible) complications...

      ---Zdenek
    • Michael Geddes
      Please, we DON T want to do what you suggest by default. But I agree we need a way of allowing people to use -u as you are. The problem as I see it, is that
      Message 2 of 12 , Sep 14, 2000
      • 0 Attachment
        Please, we DON'T want to do what you suggest by default. But I agree we
        need a way of allowing people to use -u as you are.

        The problem as I see it, is that if you do use -u to load only a small set
        of macros (for example when you use vim to run inside a script) you
        definitely DON'T want what you suggest to happen. -u is useful for just
        that reason, and I don't think that THAT
        functionality should change.

        Your own desired functionality can be done reasonably easily. Have a special
        plugin set a variable like this:

        -----------------8<------------------------- plugin/_autoplugin.vim
        let autoplugin_has_loaded=1
        ----------------8<------------------------ ~/scripts/autoplugin.vim
        if !exists('autoplugin_has_loaded)
        runtime plugin/*.vim
        endif
        ---------------------------------------------

        Then all your _vimrc type scripts need do is to so ~/scripts/autoplugin.vim
        to make sure that you have loaded your plugins.

        Also, what you suggest about using -u to debug scripts, means that you can
        possibly have a whole bunch of plugins loaded whenever you use -u, and you
        can't then get vim running without a whole lot of extra stuff.

        The functionality that allows plugins is available, so I suggest that it be
        made use of.

        //.

        -----Original Message-----
        From: Zdenek Sekera [SMTP:zs@...]
        Sent: Thursday, 14 September 2000 18:14
        To: Michael Geddes
        Cc: 'Vim Dev'
        Subject: Re: vim60h: 'vim -u vimrc' => no plugins ??

        Michael Geddes wrote:
        >
        > I see the way -u is used is more for loading a small set of macros
        for
        > executing over a particular set of files. I wouldn't invisage
        using -u
        > vimrc -u .vimrc normally.

        I disagree. In fact, I have several .vimrc for 5.7, different for
        different
        projects (found it easier to maintain than trying to ifdef things
        inside
        one depending on some $PROJECT variable) and calling different vim
        aliases
        to get the version I want. So why shouldn't I be allowed to do the
        same
        for
        6.0? More: for every testing of a problem/feature, I find very
        useful to
        be able to reduce .vimrc to a bare minimum and do vim -u
        .vimrctestversion
        to check it out. That may be out of question for 6.0.....

        I think that limitation for not loading plugin when '-u' is used
        should
        go
        away. As I said before I don't understand at all why it is there. In
        my
        'moments of niceness' :-) I tend to think there is bug in the doc
        and it
        should say 'when -u NONE is used'. That would seem logical.

        > In this case, why not get your version 5 .vimrc to check the
        version and
        > load your version 6 .vimrc.

        Well, my .vimrc is ~1500 lines. I am using the occassion of 6.0 to
        clean
        that
        up and shorten it, which is unlikely to happen if I start adding
        ifdef's...:-)
        Anyway, I thought of that as an option when 60a came up and took a
        deep
        breath
        when I realized the (possible) complications...

        ---Zdenek
      • Zdenek Sekera
        ... I am not really sure what is it that I said that you don t to have by default , I ve re-read my last post again and still didn t get it ... I would think
        Message 3 of 12 , Sep 15, 2000
        • 0 Attachment
          Michael Geddes wrote:
          >
          > Please, we DON'T want to do what you suggest by default.

          I am not really sure what is it that I said that you don't to have
          'by default', I've re-read my last post again and still didn't get it
          ...:-)

          > But I agree we
          > need a way of allowing people to use -u as you are.
          >

          I would think it is neccessary.

          > The problem as I see it, is that if you do use -u to load only a small set
          > of macros (for example when you use vim to run inside a script) you
          > definitely DON'T want what you suggest to happen. -u is useful for just
          > that reason, and I don't think that THAT
          > functionality should change.
          >

          But there is no need for a change: vim has all kinds of other mechanisms
          to
          behave the way 'you want' when 'you want' (also: replace 'you' by 'me'
          :-).
          E.g. if you don't want plugins, set/reset runtimepath to whatever you
          want
          in the -u file (to blank if you are really desperate). Etc..

          So what' the problem?

          > Your own desired functionality can be done reasonably easily. Have a special
          > plugin set a variable like this:
          >
          > -----------------8<------------------------- plugin/_autoplugin.vim
          > let autoplugin_has_loaded=1
          > ----------------8<------------------------ ~/scripts/autoplugin.vim
          > if !exists('autoplugin_has_loaded)
          > runtime plugin/*.vim
          > endif
          > ---------------------------------------------
          >
          > Then all your _vimrc type scripts need do is to so ~/scripts/autoplugin.vim
          > to make sure that you have loaded your plugins.
          >

          Well, vim starts having enough functionality that possibly all it's
          shortcomings
          (if any :-)) can be overcome by some kind of (tricky) ways, I know that.
          I get by by not using plugin feature at all...arrrrrgh...!
          And even adding that one line :runtime plugin/*.vim into the .myvimrc
          seems
          to me unneccessary when vim advocates doing it on its own.

          My problem is: should this be necessary? I am for as much as
          functionality
          as possible (and more), but with some clear concepts. This plugin is an
          excellent new feature IMHO, but if vim should behave differently
          depending
          on how I call it, I'd say 'NO WAY'.

          Of all the people, Michael, do you really advocate that

          vim myfile
          and vim -u .vimrc myfile (note the '.vimrc' file name)

          behave differently ?????? Aren't these meant to be two identical ways of
          calling vim???? At least they were until plugin came by...

          > Also, what you suggest about using -u to debug scripts, means that you can
          > possibly have a whole bunch of plugins loaded whenever you use -u, and you
          > can't then get vim running without a whole lot of extra stuff.
          >

          No, I'd set runtimepath='' and I am done, or not touch it at all to get
          loaded what vim provides as part of distrib if I suspect that 'this'
          might be
          part of a problem.

          > The functionality that allows plugins is available, so I suggest that it be
          > made use of.

          Right. For now I have to avoid it, though....

          Or not quite: I have to keep what I had before: stuff everything into
          .vimrc
          (or whatever name I use). Not good at all...

          ---Zdenek
        • Michael Geddes
          Ok. I concede... plugins should be loaded... The question is, what do we do in place of gvim -u NONE -U NONE maybe gvim -u! NONE -U! NONE //. ... From: Zdenek
          Message 4 of 12 , Sep 17, 2000
          • 0 Attachment
            Ok. I concede... plugins should be loaded...

            The question is, what do we do in place of

            gvim -u NONE -U NONE

            maybe

            gvim -u! NONE -U! NONE

            //.

            -----Original Message-----
            From: Zdenek Sekera [SMTP:zs@...]
            Sent: Friday, 15 September 2000 19:06
            To: Michael Geddes
            Cc: 'Vim Dev'
            Subject: Re: vim60h: 'vim -u vimrc' => no plugins ??

            Michael Geddes wrote:
            >
            > Please, we DON'T want to do what you suggest by default.

            I am not really sure what is it that I said that you don't to have
            'by default', I've re-read my last post again and still didn't get
            it
            ...:-)

            > But I agree we
            > need a way of allowing people to use -u as you are.
            >

            I would think it is neccessary.

            > The problem as I see it, is that if you do use -u to load only a
            small set
            > of macros (for example when you use vim to run inside a script)
            you
            > definitely DON'T want what you suggest to happen. -u is useful
            for just
            > that reason, and I don't think that THAT
            > functionality should change.
            >

            But there is no need for a change: vim has all kinds of other
            mechanisms
            to
            behave the way 'you want' when 'you want' (also: replace 'you' by
            'me'
            :-).
            E.g. if you don't want plugins, set/reset runtimepath to whatever
            you
            want
            in the -u file (to blank if you are really desperate). Etc..

            So what' the problem?

            > Your own desired functionality can be done reasonably easily. Have
            a special
            > plugin set a variable like this:
            >
            > -----------------8<-------------------------
            plugin/_autoplugin.vim
            > let autoplugin_has_loaded=1
            > ----------------8<------------------------
            ~/scripts/autoplugin.vim
            > if !exists('autoplugin_has_loaded)
            > runtime plugin/*.vim
            > endif
            > ---------------------------------------------
            >
            > Then all your _vimrc type scripts need do is to so
            ~/scripts/autoplugin.vim
            > to make sure that you have loaded your plugins.
            >

            Well, vim starts having enough functionality that possibly all it's
            shortcomings
            (if any :-)) can be overcome by some kind of (tricky) ways, I know
            that.
            I get by by not using plugin feature at all...arrrrrgh...!
            And even adding that one line :runtime plugin/*.vim into the
            .myvimrc
            seems
            to me unneccessary when vim advocates doing it on its own.

            My problem is: should this be necessary? I am for as much as
            functionality
            as possible (and more), but with some clear concepts. This plugin is
            an
            excellent new feature IMHO, but if vim should behave differently
            depending
            on how I call it, I'd say 'NO WAY'.

            Of all the people, Michael, do you really advocate that

            vim myfile
            and vim -u .vimrc myfile (note the '.vimrc' file
            name)

            behave differently ?????? Aren't these meant to be two identical
            ways of
            calling vim???? At least they were until plugin came by...

            > Also, what you suggest about using -u to debug scripts, means that
            you can
            > possibly have a whole bunch of plugins loaded whenever you use -u,
            and you
            > can't then get vim running without a whole lot of extra stuff.
            >

            No, I'd set runtimepath='' and I am done, or not touch it at all to
            get
            loaded what vim provides as part of distrib if I suspect that 'this'
            might be
            part of a problem.

            > The functionality that allows plugins is available, so I suggest
            that it be
            > made use of.

            Right. For now I have to avoid it, though....

            Or not quite: I have to keep what I had before: stuff everything
            into
            .vimrc
            (or whatever name I use). Not good at all...

            ---Zdenek
          • Vince Negri
            ... gvim -u NONE -U NONE --noplugins I assume? Vince Legal Disclaimer: Any views expressed by the sender of this message are not necessarily those of
            Message 5 of 12 , Sep 18, 2000
            • 0 Attachment
              > Michael Geddes [SMTP:mgeddes@...] asked:
              >
              >The question is, what do we do in place of

              > gvim -u NONE -U NONE

              gvim -u NONE -U NONE --noplugins

              I assume?

              Vince


              Legal Disclaimer: Any views expressed by the sender of this message are
              not necessarily those of Application Solutions Ltd. Information in this
              e-mail may be confidential and is for the use of the intended recipient
              only, no mistake in transmission is intended to waive or compromise such
              privilege. Please advise the sender if you receive this e-mail by mistake.
            • Zdenek Sekera
              ... May world be in peace, Bram, we agree :-) :-) :-)!!!!! Can you fix that, please? ... Good question, I d think one should get the most default behaviour
              Message 6 of 12 , Sep 18, 2000
              • 0 Attachment
                Michael Geddes wrote:
                >
                > Ok. I concede... plugins should be loaded...
                >

                May world be in peace, Bram, we agree :-) :-) :-)!!!!!
                Can you fix that, please?

                > The question is, what do we do in place of
                >
                > gvim -u NONE -U NONE
                >
                > maybe
                >
                > gvim -u! NONE -U! NONE

                Good question, I'd think one should get the most 'default'
                behaviour as possible, if I wanted even to avoid loaded plugins
                I guess I could always add --noplugins.
                Would that be OK?

                ---Zdenek
              • Zdenek Sekera
                ... Definitely. ... I agree. What about a new vim -u NOVIMRC saying no .vimrc file but still loading system plugins? ... I think that s done already:
                Message 7 of 12 , Oct 2, 2000
                • 0 Attachment
                  Bram Moolenaar wrote:
                  >
                  > Zdenek Sekera wrote:
                  >
                  > > The doc states (:h load-plugins) that when vim (6.0) is called with
                  > > -u (to specify a vimrc script) plugins will not be loaded.
                  > >
                  > > Why? This property makes usage of plugin pretty useless IMHO.
                  >
                  > Right, mixing the loading of vimrc files with plugins is only causing
                  > confusion.
                  >

                  Definitely.

                  > However, I like the idea of "vim -u NONE" not loading a plugin. Then it's
                  > easier to start with an unmodified Vim session (e.g. to reproduce a bug).
                  >

                  I agree. What about a new 'vim -u NOVIMRC' saying 'no .vimrc file' but
                  still
                  loading 'system' plugins?

                  > Otherwise, "vim -u abc" should still load the plugins. We then need another
                  > argument to disable loading plugins.

                  I think that's done already: 'vim -u abc --noplugins'
                  I like it that way.

                  ---Zdenek
                • Bram Moolenaar
                  ... Makes sense. Althought I would call it NORC , since .exrc files are also skipped. Then the list becomes: load vimrc load plugins -u NONE no
                  Message 8 of 12 , Oct 2, 2000
                  • 0 Attachment
                    Zdenek Sekera wrote:

                    > > However, I like the idea of "vim -u NONE" not loading a plugin. Then it's
                    > > easier to start with an unmodified Vim session (e.g. to reproduce a bug).
                    >
                    > I agree. What about a new 'vim -u NOVIMRC' saying 'no .vimrc file' but
                    > still loading 'system' plugins?

                    Makes sense. Althought I would call it "NORC", since .exrc files are also
                    skipped. Then the list becomes:

                    <nothing> load vimrc load plugins
                    -u NONE no vimrc no plugins
                    -u NORC no vimrc load plugins
                    --noplugins load vimrc no plugins

                    --
                    ~
                    ~
                    ~
                    ".signature" 4 lines, 50 characters written

                    /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
                    \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
                  • Zdenek Sekera
                    ... Sounds just right!
                    Message 9 of 12 , Oct 2, 2000
                    • 0 Attachment
                      Bram Moolenaar wrote:
                      >
                      > Zdenek Sekera wrote:
                      >
                      > > > However, I like the idea of "vim -u NONE" not loading a plugin. Then it's
                      > > > easier to start with an unmodified Vim session (e.g. to reproduce a bug).
                      > >
                      > > I agree. What about a new 'vim -u NOVIMRC' saying 'no .vimrc file' but
                      > > still loading 'system' plugins?
                      >
                      > Makes sense. Althought I would call it "NORC", since .exrc files are also
                      > skipped. Then the list becomes:
                      >
                      > <nothing> load vimrc load plugins
                      > -u NONE no vimrc no plugins
                      > -u NORC no vimrc load plugins
                      > --noplugins load vimrc no plugins

                      Sounds just right!

                      ---Zdenek
                    • hitched97@hotpop.com
                      ... What s wrong with load vimrc load plugins -u NONE no vimrc load plugins -u NONE -noplugins no vimrc
                      Message 10 of 12 , Oct 2, 2000
                      • 0 Attachment
                        At 05:05 AM 10/2/00, Bram Moolenaar wrote:
                        > <nothing> load vimrc load plugins
                        > -u NONE no vimrc no plugins
                        > -u NORC no vimrc load plugins
                        > --noplugins load vimrc no plugins

                        What's wrong with
                        <nothing> load vimrc load plugins
                        -u NONE no vimrc load plugins
                        -u NONE -noplugins no vimrc no plugins
                        --noplugins load vimrc no plugins

                        Sounds like you're adding a command line option that duplicates
                        available functionality.

                        --
                        Steve Wall
                      • Bram Moolenaar
                        ... Yes. The reason is that I always ask people to use vim -u NONE to start Vim without any local vimrc files or other settings. I would have to change
                        Message 11 of 12 , Oct 3, 2000
                        • 0 Attachment
                          Steve Wall wrote:

                          > At 05:05 AM 10/2/00, Bram Moolenaar wrote:
                          > > <nothing> load vimrc load plugins
                          > > -u NONE no vimrc no plugins
                          > > -u NORC no vimrc load plugins
                          > > --noplugins load vimrc no plugins
                          >
                          > What's wrong with
                          > <nothing> load vimrc load plugins
                          > -u NONE no vimrc load plugins
                          > -u NONE -noplugins no vimrc no plugins
                          > --noplugins load vimrc no plugins
                          >
                          > Sounds like you're adding a command line option that duplicates
                          > available functionality.

                          Yes. The reason is that I always ask people to use "vim -u NONE" to start Vim
                          without any local vimrc files or other settings. I would have to change that
                          to "vim -u NONE --noplugins", which is getting a bit long.

                          The idea is that "-u NONE" tells Vim to skip initializations from user files.
                          I don't find it strange that plugins are also skipped then. Do you?

                          If we add some other kind of intitialization file, some extra --noxyz option
                          will have to be added. I like the idea that "-u NONE" still disables all
                          then, instead of requiring typing all "--no" arguments.

                          --
                          hundred-and-one symptoms of being an internet addict:
                          148. You find it easier to dial-up the National Weather Service
                          Weather/your_town/now.html than to simply look out the window.

                          /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
                          \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
                        • Zdenek Sekera
                          ... [...] ... I think Bram is right here, this scheme is simple to grasp and simply extends existing -u NONE further down. It doesn t bother me that it
                          Message 12 of 12 , Oct 3, 2000
                          • 0 Attachment
                            Bram Moolenaar wrote:
                            >
                            [...]
                            > > Sounds like you're adding a command line option that duplicates
                            > > available functionality.
                            >
                            > Yes. The reason is that I always ask people to use "vim -u NONE" to start Vim
                            > without any local vimrc files or other settings. I would have to change that
                            > to "vim -u NONE --noplugins", which is getting a bit long.
                            >

                            I think Bram is right here, this scheme is simple to grasp and simply
                            extends
                            existing -u NONE further down. It doesn't bother me that it duplicates
                            certain
                            other params combo.

                            > The idea is that "-u NONE" tells Vim to skip initializations from user files.
                            > I don't find it strange that plugins are also skipped then. Do you?
                            >

                            I think it is in fact very logical:
                            -u NONE => no vimrc, have bare minimum => no plugins (don't know where
                            to
                            load them from, think of it as 'no runtimepath')
                            -u NORC => no user config, but still have system runtimepath => use it
                            --noplugins => has nothing to do vimrc, load vimrc but do what it says:
                            don't load plugins.

                            I like it.

                            > If we add some other kind of intitialization file, some extra --noxyz option
                            > will have to be added. I like the idea that "-u NONE" still disables all
                            > then, instead of requiring typing all "--no" arguments.

                            Agreed.

                            ---Zdenek
                          Your message has been successfully submitted and would be delivered to recipients shortly.