docs: update collapse patterns documentation in AGENTS.md

This commit is contained in:
2026-02-20 23:53:55 +01:00
parent 7b25cf6202
commit 5282385e79
+9 -3
View File
@@ -215,9 +215,15 @@ local options = {
3. Now toggle/expand works correctly
### Default Collapse Patterns
- `^%s*{%s*EXTERNAL` - Variable attributes: `{EXTERNALACCESSIBLE := 'false'; ...}`
- `^%s*{ S7_` - Block attributes: `{ S7_Optimized_Access := 'TRUE' }`
- `^%s*{%s*%w+%s*:=` - Generic attributes with assignments
The `:SCLCollapseAllAttrBlocks` command uses case-insensitive patterns:
- `EXTERNAL` - Variable attributes: `{EXTERNALACCESSIBLE := 'false'; EXTERNALVISIBLE := 'false'}`
- `S7_` - Block attributes: `{S7_Optimized_Access := 'TRUE'}`
- `NonRetain` - NonRetain attribute: `{NonRetain}`
- `Retain` - Retain attribute: `{Retain}`
- `%w+ :=` - Generic attributes with assignments: `{key := 'value'}`
- `%w+` - Single word attributes: `{SomeAttribute}`
Works in `.scl`, `.udt`, and `.db` files.
### Per-Variable Collapse Rules
Control collapsing per variable using rules (evaluated before global patterns):