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

6.0ac - 'autoread' is global, should be buffer-specific

Expand Messages
  • Ron Aaron
    If I have several windows open, and I type ... in a buffer, all the buffers loaded get ar turned on. The docs actually say that ar is global, but it
    Message 1 of 8 , Apr 26, 2001
    • 0 Attachment
      If I have several windows open, and I type

      :setlocal ar

      in a buffer, all the buffers loaded get 'ar' turned on. The docs actually say
      that 'ar' is global, but it should be buffer-specific, I think.


      --
      "VINE: Vim Integrated News and Email"
      get it from: http://www.mossbayeng.com/~ron/vim/vine.html
      Ron Aaron Moss Bay Engineering
      425-649-8817 Precision Crafted Software
      http://www.mossbayeng.com/~ron/ronsresume.html
    • Bram Moolenaar
      ... If this is a local option, you won t be able to say auto-read all buffers . And I actually think that s what most people will want to do. I could make it
      Message 2 of 8 , Apr 26, 2001
      • 0 Attachment
        Ron Aaron wrote:

        > If I have several windows open, and I type
        >
        > :setlocal ar
        >
        > in a buffer, all the buffers loaded get 'ar' turned on. The docs actually
        > say that 'ar' is global, but it should be buffer-specific, I think.

        If this is a local option, you won't be able to say "auto-read all buffers".
        And I actually think that's what most people will want to do.

        I could make it a global-local option. That's extra work, thus I'll only do
        that when there is a good reason.

        --
        Dogs must have a permit signed by the mayor in order to congregate in groups
        of three or more on private property.
        [real standing law in Oklahoma, United States of America]

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Ron Aaron
        ... But as it is now, it is impossible to have just one buffer auto-read. ... I disagree, but I think one can have the behaviour you think is right, as well as
        Message 3 of 8 , Apr 26, 2001
        • 0 Attachment
          Bram Moolenaar <Bram@...> writes:
          >If this is a local option, you won't be able to say "auto-read all buffers".

          Sure they will:

          :bufdo set ar

          Or:
          :au BufRead * set ar

          But as it is now, it is impossible to have just one buffer auto-read.

          >And I actually think that's what most people will want to do.

          I disagree, but I think one can have the behaviour you think is right, as well
          as the one I think is right.

          >I could make it a global-local option. That's extra work, thus I'll only do
          >that when there is a good reason.

          :-)
        • Bram Moolenaar
          ... Won t work for new buffers. ... Won t work for new buffers either. You can see it s not _that_ easy! ... That s true. Even bufenter/bufleave autocommand
          Message 4 of 8 , Apr 27, 2001
          • 0 Attachment
            Ron Aaron wrote:

            > >If this is a local option, you won't be able to say "auto-read all buffers".
            >
            > Sure they will:
            >
            > :bufdo set ar

            Won't work for new buffers.

            > Or:
            > :au BufRead * set ar

            Won't work for new buffers either.

            You can see it's not _that_ easy!

            > But as it is now, it is impossible to have just one buffer auto-read.

            That's true. Even bufenter/bufleave autocommand won't do what you want.

            > >And I actually think that's what most people will want to do.
            >
            > I disagree, but I think one can have the behaviour you think is right, as
            > well as the one I think is right.

            Why do you disagree? You're not "most people" thus you'll have to explain your
            opinion.

            > >I could make it a global-local option. That's extra work, thus I'll only
            > >do that when there is a good reason.
            >
            > :-)

            Well, still didn't hear that good reason...

            --
            A special cleaning ordinance bans housewives from hiding dirt and dust under a
            rug in a dwelling.
            [real standing law in Pennsylvania, United States of America]

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • Ron Aaron
            ... What made you change your mind for 6.0ad? Best regards, Ron
            Message 5 of 8 , Apr 30, 2001
            • 0 Attachment
              Bram Moolenaar <Bram@...> writes:
              >> I disagree, but I think one can have the behaviour you think is right, as
              >> well as the one I think is right.
              >
              >Why do you disagree? You're not "most people" thus you'll have to explain your
              >opinion.
              ...
              >Well, still didn't hear that good reason...

              What made you change your mind for 6.0ad?

              Best regards,
              Ron
            • Bram Moolenaar
              ... I thought of the situation where you want automatic reloading only for a log file and not for other files. Nevertheless, I m not completely happy with the
              Message 6 of 8 , Apr 30, 2001
              • 0 Attachment
                Ron Aaron wrote quite a few things today, among which:

                > Bram Moolenaar <Bram@...> writes:
                > >> I disagree, but I think one can have the behaviour you think is right, as
                > >> well as the one I think is right.
                > >
                > >Why do you disagree? You're not "most people" thus you'll have to explain
                > >your opinion.
                > ...
                > >Well, still didn't hear that good reason...
                >
                > What made you change your mind for 6.0ad?

                I thought of the situation where you want automatic reloading only for a log
                file and not for other files.

                Nevertheless, I'm not completely happy with the local option. All other
                global-local options are strings. You can make them empty to switch back to
                using the global value. But for a boolean option that is not possible. Once
                you have set the local value, you can't go back to using the global one.
                It would require a new command to get around that...

                --
                I learned the customs and mannerisms of engineers by observing them, much the
                way Jane Goodall learned about the great apes, but without the hassle of
                grooming.
                (Scott Adams - The Dilbert principle)

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
                \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
              • Moore, Paul
                From: Bram Moolenaar [mailto:Bram@moolenaar.net] ... Could you (mis-)use :set autoread& for that? In some sense, the global value is the default for a
                Message 7 of 8 , May 1 1:35 AM
                • 0 Attachment
                  From: Bram Moolenaar [mailto:Bram@...]
                  > Nevertheless, I'm not completely happy with the local option.
                  > All other global-local options are strings. You can make them
                  > empty to switch back to using the global value. But for a
                  > boolean option that is not possible. Once you have set the
                  > local value, you can't go back to using the global one.
                  > It would require a new command to get around that...

                  Could you (mis-)use :set autoread& for that?

                  In some sense, the global value is the "default" for a global-local
                  option...

                  Paul.
                • Bram Moolenaar
                  ... Well, :set autoread& actually means to set the global value back to the default (which is off ). Thus I would at least expect it to change the ... This
                  Message 8 of 8 , May 1 4:11 AM
                  • 0 Attachment
                    Paul Moore wrote:

                    > From: Bram Moolenaar [mailto:Bram@...]
                    > > Nevertheless, I'm not completely happy with the local option.
                    > > All other global-local options are strings. You can make them
                    > > empty to switch back to using the global value. But for a
                    > > boolean option that is not possible. Once you have set the
                    > > local value, you can't go back to using the global one.
                    > > It would require a new command to get around that...
                    >
                    > Could you (mis-)use :set autoread& for that?
                    >
                    > In some sense, the global value is the "default" for a global-local
                    > option...

                    Well, ":set autoread&" actually means to set the global value back to the
                    default (which is "off"). Thus I would at least expect it to change the
                    global value. But we could use:

                    :setlocal autoread&

                    This would reset the local value to off, but we can use it to reset it to the
                    global value instead. If you want to switch autoread off locally, you can
                    just do that.

                    --
                    The Feynman problem solving Algorithm:
                    1) Write down the problem
                    2) Think real hard
                    3) Write down the answer

                    /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                    ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
                    \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
                  Your message has been successfully submitted and would be delivered to recipients shortly.