Parameter syntax:
[ 'toggle'|'collapse'|'expand'|'collapseAll'|'expandAll' [ '+' 'toggle'|'collapse'|'expand'|'collapseAll'|'expandAll']? ]?
Changes the state of the nearest collapsible view.
The ``nearest collapsible view'' is searched like this:
Search starts at explicitly selected node if any; otherwise at node containing caret.
If this node is an element and has a collapsible view, search is completed: this view is the ``nearest collapsible view''.
Otherwise search continues with the parent of the node.
The parameter of this command specifies up to two operations. The default operation is toggle
. Supported operations are:
Collapses nearest collapsible view if it is expanded and expands nearest collapsible view if it is collapsed.
Collapses nearest collapsible view if it is expanded; otherwise has no effect.
Expands nearest collapsible view if it is collapsed; otherwise has no effect.
Collapses nearest collapsible view and then, recursively collapses all its collapsible descendant views.
Expands nearest collapsible view and then, recursively expands all its collapsible descendant views.
Recommended bindings (found in the add-on called "A sample customize.xxe" — download and install it using
→ ):<binding> <keyPressed code="ESCAPE" /> <charTyped char="/" /> <command name="toggleCollapsed" /> </binding> <binding> <keyPressed code="ESCAPE" /> <charTyped char="+" /> <command name="toggleCollapsed" parameter="expandAll" /> </binding> <binding> <keyPressed code="ESCAPE" /> <charTyped char="-" /> <command name="toggleCollapsed" parameter="collapseAll" /> </binding> <binding> <keyPressed code="ESCAPE" /> <charTyped char="1" /> <command name="toggleCollapsed" parameter="collapseAll+expand" /> </binding>