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

14093Re: set cindent...

Expand Messages
  • Bram Moolenaar
    May 29, 2000
      [this should be in vim-dev...]

      Benji Fisher wrote:

      > This seems complicated to me. Why not change the behavior that
      > buffer-specific options are set from the current buffer when a new
      > buffer is opened? (Ditto for window-specific options.) If you want to
      > be compatible with the current versions of Vim then add a new flag to
      > 'cpoptions' that indicates this new behavior.

      If the option value isn't taken from the current buffer, which value is used
      then? You could only use the default value, I suppose. Then you get into
      trouble when doing this;

      vim *.foo
      :set cindent

      Then 'cindent' is off again. You would have to do ":set cindent" for every
      file again. That's where the idea of a "global option value" came from.

      Whether you set the global value with ":set", ":globalset" or some other way
      remains to be decided. What I proposed in my previous message is closest to
      how it is now, to avoid incompatibilities with previous versions.

      > If it bothers others, why not extend the syntax of :set rather than
      > introduce :localset and :globalset ? The syntax
      > :set textwidth&=78
      > makes sense to me, although it is less clear how to do it for boolean
      > options, like 'cindent'.

      This looks rather obscure to me. A ":globalset" or ":gset" command is easier
      to implement and its clearer what it does.

      > I would say not to change options in buffers that are already open,
      > unless the user calls for it explicitly.


      A special law prohibits unmarried women from parachuting on Sunday or she
      shall risk arrest, fine, and/or jailing.
      [real standing law in Florida, United States of America]

      /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
      \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
    • Show all 2 messages in this topic