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

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

Expand Messages
  • 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 1 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 2 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.