This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Code folding when editing a YAML file is over-eager. From the Tools / Options / Editor / General screen, tick Code folding / Collapse by default: Methods Create a file of type "YAML File" and type some YAML code into the editor panel. For any text that is indented, the yaml editor will fold the code as you type it. Expected that the code will remained unfolded until asked and I wouldn't expect the code to fold by default (yaml keys/values aren't methods). The only workaround I have found is to disable the above option, but this disables across all file types. This happens consistently. As a side/personal note I find the behaviour a little over-eager when editing PHP methods as well - I would only expect the default folding to happen on page load. Product Version: NetBeans IDE 7.0 (Build 201104080000) Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09 System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
Reassigning
It could be better to use another ption then "Method"...e.g. "Tags and another code blocks". But all other things are not yaml connected...yaml support just provides offset ranges to fold, nothing else. That problems, you describe, are problem of folding infrastructure from CSL, or from some higher infrastructure.
So folding is now nmanaged by "Tags and other code blocks" option. Fixed in web-main #caf5ebbe67e0
Integrated into 'main-golden', will be available in build *201205050400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/caf5ebbe67e0 User: Ondrej Brejla <obrejla@netbeans.org> Log: #199885 - Code folding when editing YAML is over-eager.