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

41056Retrieving default values of options from a script

Expand Messages
  • Nikolai Weibull
    Nov 19 3:06 PM
    • 0 Attachment
      I would like to know the default value for 'fileformat' while executing
      a script. The only way I've come up with is to:

      let ff_save = &fileformat
      set fileformat&
      let ff_default = &fileformat
      let &fileformat = ff_save

      and ff_default will contain the default value for 'fileformat'. The
      only problem with this is that setting 'fileformat' isn't good, as it
      will update 'modified' under the wrong conditions. It also won't work
      if the file isn't 'modifiable'. So I was wondering how to get at the
      default value without disturbing the setting itself? One idea I had was
      to allow for:

      let ff_default = &fileformat&,

      i.e., the "&" suffix will give you the default value of the given

      So, to summarize:

      1 Is there already a way to get at the default value?

      2 If not, could we please add a way to do it?



      Nikolai Weibull: now available free of charge at http://bitwi.se/!
      Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
    • Show all 4 messages in this topic