V13 Expandable folders idea


I have tried the new "Expandable folders" feature, I find it convenient to use Alt + Down to expand a folder, however I was expecting to be able to collapse the folder with Alt + Up while selecting a file inside the folder.
Currently, it doesn't work, we have to go up and select the parent folder to be able to collapse it.

Wouldn't it make sense to allow this behavior ?

For instance:

  • I have all my folders listed, I want to open a file from a specific folder without moving the current path to this folder
  • I select the folder and expand it
  • I go down with the keyboard to select the file I want to open
  • once I'm done, I would like to "close/collapse" the folder. I cannot do it quickly while the file is selected. I have to select the parent folder to be able to use Alt + Up.

Thank you

1 Like

The solution from this thread should work:

1 Like


I have tried to use:

Go EXPANDBRANCH=collapse PATH="{=Right(filepath,1)=="\" ? filepath : Parent(filepath)=}"

however it works only when a file is selected, not when a folder is selected.
Do you have another trick ? :slight_smile:

This should collapse the selected expanded folder. I guess you want it to collapse a collapsed folder's parent, right?

Have a look here, all whole script for that purpose (and more):

I can't manage to do it here.
See example below:

On level 1 file, it collapse, but on Level 2 folder, it doesn't do anything.

That's odd. Are you sure you have set up the hotkey correctly?

Works fine here:

I think it will be trying to collapse the selected folder ("Level 2 folder") which is already collapsed, but Megosu is expecting it to collapse the folder above it ("Level 1 folder").

1 Like

@megosu FWIW, I can do that by using :
ExpandFolders COLLAPSE=parent when selecting a subfolder or a file.

1 Like

good example, you have the same issue as I have:
we can clearly see on the video that you couldn't collapse while selecting the child folder "Plugins". You had to go up and select the parent folder "ConfigFiles" folders in order to be able to collapse.
However, you were able to collapse when the child file was selected, which is what I get too.
Any way to be able to collapse the folder when a child folder/file is selected ?

The additional script you mentioned seems great, I'll give it a go but I don't think I need that much power, and I tend to avoid loading external scripts and having to dread the day it won't work anymore because of an update or something else... :slight_smile: unless there is no other choice ?

Isn't this what I suspected you wanted?

I don't think that's possible, because there is no way of detecting with the evaluator whether the selected folder is expanded or collapsed. You would need a second command for this:

go expandbranch=collapse PATH={filepath|..}
Go {filepath|..} OPENCONTAINER

I'd say this is rather unlikely, and maybe the evaluator learns a few new tricks so we can handle this without any scripting and in a single hotkey.

in simple terms:
I thought it would make sense to be able to collapse the folder from any direct child item (be it a file or a folder).

Is it possible with a simple set of commands ?

We plan to change the built-in command/hotkey to do something like this. Probably in the next beta.


I thought it would make sense, thank you ! I'll happily wait :slight_smile:

bonus question, if I may: is there a way to refresh the view without resetting all folders expanded states ?

Maybe via a script (that would also do the refresh and then re-expand things), but not built-in.

I posted a requested feature, who knows, maybe it'll come one day :slight_smile:


looks like 13.1.2 (Beta) and 13.2 do the trick, I need to update and try now :slight_smile:

This is great news ! Thanks

The Go EXPANDBRANCH=collapse command (bound by default to Alt+Up) now automatically collapses the parent branch if the currently selected item is a file or an already-collapsed folder. Add the noparent argument to disable this new behaviour.
1 Like

works perfect !

1 Like