Skip to content

Conversation

@halo
Copy link
Owner

@halo halo commented Oct 22, 2025

When a folder is selected in the File View Panel, pressing Enter toggles that folder (collapse/expand).

This PR adds a feature such that pressing Alt+Enter will toggle not only the selected folder, but also all its subfolders.

Screenshot 2025-10-22 at 13 41 02

This behavior is standard for all tree views in macOS and for example in the DOM tree of the Chrome developer console (until recently this also was standard in the vscode file explorer).

Related: Pressing = will expand all folders and - will collapse all folders (regardless of the current selection). This was added in jesseduffield#4131

Notice for testing this manually: Your terminal must send the Alt key events. At least on macOS that doesn't happen automatically, unless you activate "Use Option as Meta key" in the Terminal.app preferences (or add [window] option_as_alt = 'Both' to your alacritty.toml)

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

When a folder is selected in the File View Panel, pressing Enter toggles that folder (collapse/expand).
This PR adds a feature such that pressing Alt+Enter will toggle not only the selected folder, but also all its subfolders.
This behavior is standard for all tree views in macOS and for example in the DOM tree of the Chrome developer console (until recently this also was standard in the vscode file explorer).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants