Tapatalk

Code Folding for INI files?

Code Folding for INI files?

2
NewbieNewbie
2

    Apr 29, 2005#1

    I've set up custom syntax highlighting for INI file (plus my own personal extensions to the ini file format) and was wondering if there's a way anyone can think of to do code folding on sections. Sections don't have an end-tag, they just end at the start of the next section. For example

    [section1]
    key1=foo
    key2=bar

    [section2]
    key_a=wom
    key_b=bat

    I'd like to be able to fold the keys within section1, section2, etc.

    Can anyone think of a way to do it without having to put a custom comment end-tag at the end of each section? (which wouldn't stay at the end as new keys are added to sections, be cumbersome to add across many many ini files, etc.)

    Thanks!
    Selmo

    10
    Basic UserBasic User
    10

      May 01, 2005#2

      Yes, just add

      Code: Select all

      /Open Fold Strings =  "["
      /Close Fold Strings = "["
      
      to the wordfile section. Didn't work with the first UE 11.0x versions, but does now.
      Note that the last INI section can't be folded (since it has no real ending).

      2
      NewbieNewbie
      2

        May 01, 2005#3

        Great, that works. Thanks

        I tried that initially, but I wasn't running the latest 11.10 release, which is why it wasn't working. Once I updated, it worked. (I didn't see any mention of that change in the 11.00->11.10 change notes.)