> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/preferences/preferences_categories/file_displays/folder_expansion.md).

# Folder Expansion

This page contains options relating to [expandable folders](/directory-opus/manual/basic_concepts/expandable_folders.md) (the feature that lets you expand folders in the file display like you can in the folder tree).

* **Make folders expandable in the file display**: This option enables the folder expansion feature. If this is turned off, folders won't be expandable at all.
* **Hide expand buttons until a folder is expanded**: This option lets you enable folder expansion without the expander buttons taking up space until they're actually needed. Because the expanders start out hidden, if this option is on the only way to expand a folder is to run the `Go EXPANDBRANCH` command. For example, you can assign that to a hotkey or toolbar button, and use it to initially expand a folder. Once one folder has been expanded the expander buttons will stay visible until the folder is changed or refreshed.

### Collapse

* **Clear selections within collapsed folders**: When an expanded folder is collapsed, any items within it that were selected have their selection status cleared (so that when you expand the item again they will be unselected).
* **Collapse sub-folders within collapsed folders**: When an expanded folder is collapsed, any expanded sub-folders within it are also collapsed (so that when you expand the item again they will be unexpanded).

### Drag and drop

* **Expand folders when dragging over them**: If turned on, you can drag files over an unexpanded folder and it will pop open, letting you drop the files into one of its sub-folders.
* **Collapse after drag (spring-loaded)**: If the previous option is turned on, this option makes the folders that you've dragged over close again after the drop is complete.
* **Expansion delay**: Configure the time (in milliseconds) that you need to hover the mouse over a folder during drag and drop before it expands.

### Remember

* **Remember expanded folders when going back and forward**: Any expanded folders will be re-expanded when moving back/forward in the history list.
* **Remember expanded folders when refreshing**: Any expanded folders will be re-expanded after the folder is refreshed (e.g. after pressing F5).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/preferences/preferences_categories/file_displays/folder_expansion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
