Home Explore Blog CI



neovim

14th chunk of `runtime/doc/filetype.txt`
1db744bec5d2a6fd245e30afde61582442887d2fb97557c50000000100000b38
 value.  Each key in the map must be at most as wide
      as "Key__" header: "Key" allows at most 3-byte keys, "Key__" allows at
      most 5-byte keys.  If keys actually occupy less bytes then the rest is
      filled with spaces.  Keys cannot be empty, end with spaces, contain two
      consequent spaces inside of them or contain multibyte characters (use
      "=" format if you need this).  Descriptions have the same restrictions
      on width and contents, except that empty descriptions are allowed.
      Description column may be omitted.

      When writing description is ignored.  Keys with values |msgpack#equal|
      to default ones are ignored.  Order of keys is preserved.  All keys are
      treated as strings (not binary strings).

      Note: specifically for buffer list entries it is allowed to have more
      then one map header.  Each map header starts a new map entry inside
      buffer list because ShaDa buffer list entry is an array of maps.  I.e. >

        Buffer list with timestamp 1970-01-01T00:00:00:
          % Key  Description  Value
          + f    file name    "/foo"
          + l    line number  1
          + c    column       10
<
      is equivalent to >

        Buffer list with timestamp 1970-01-01T00:00:00:
          = [{="f": "/foo", ="c": 10}]
<
      and >

        Buffer list with timestamp 1970-01-01T00:00:00:
          % Key  Description  Value
          + f    file name    "/foo"

          % Key  Description  Value
          + f    file name    "/bar"
<
      is equivalent to >

        Buffer list with timestamp 1970-01-01T00:00:00:
          = [{="f": "/foo"}, {="f": "/bar"}]
<
      Note 2: specifically for register entries special syntax for arrays was
      designed: >

        Register with timestamp 1970-01-01T00:00:00:
          % Key  Description  Value
          + rc   contents     @
          | - "line1"
          | - "line2"
<
      This is equivalent to >

        Register with timestamp 1970-01-01T00:00:00:
          % Key  Description  Value
          + rc   contents     ["line1", "line2"]
<
      Such syntax is automatically used if array representation appears to be
      too lengthy.
   2. "  @  Description__  Value": array header.  Same as map, but key is
      omitted and description cannot be omitted.  Array entries start with
      "  -". Example: >

        History entry with timestamp 1970-01-01T00:00:00:
          @ Description_  Value
          - history type  SEARCH
          - contents      "foo"
          - separator     '/'
<
      is equivalent to >

        History entry with timestamp 1970-01-01T00:00:00:
          = [SEARCH, "foo", '/']
<
      Note: special array syntax for register entries is not recognized here.
   3. "  = {msgpack-value}": raw values.  |{msgpack-value}| in this case may
      have absolutely any type.  Special array syntax

Title: Shada File Format: Map and Array Headers, Raw Values, and Buffer List/Register Syntax
Summary
This section further elaborates on the Shada file format, explaining the structure and syntax of map and array headers. It details the constraints on keys and descriptions within map headers, specifically for buffer list entries, allowing multiple map headers to create an array of maps. It also describes a special syntax for arrays in register entries. For array headers, it explains how descriptions are handled and gives an example of History entries. Finally, it covers raw values represented by '= {msgpack-value}', where the value can be of any type, and mentions that special array syntax is not supported.