Intellij, project navigation. Expand all folder and file tree

Intellij IdeaIntellij PluginIntellij 14FoldingIntellij 13

Intellij Idea Problem Overview


Is it possible to expand the entire project tree in Intellij? I would like to do this so I can more easily search the structure and jump back and forth between files and folders.

I know of double shift, and CTRL+SHIFT+N, but that is not what I am after.

Intellij Idea Solutions


Solution 1 - Intellij Idea

There is a Fully Expand Tree Node action, which is bound to Numpad * key (*) by default.

But if you use this key, it doesn't expand the whole tree, rather it expands the first level and when you press it again it expands subsequent levels, and so on.

But it can still do what you're trying to achieve. Just click the tree item you want to expand (for example src) in project view, press and hold the * key and all nodes will be expanded pretty quickly. It's not the best way but I'm not aware of any better solution.

Tested on IntelliJ IDEA 14 and 2019.3.3 Ultimate

If you press *: Expand 1 level.

If you press * *: Expand 2 levels.

If you press * * *: Expand 3 levels.

and so on.

Solution 2 - Intellij Idea

You can use right-arrow button to expand the selected node,and keep pressing to expand all node.

Or

Search "Fully Expand Tree Node" in settings->Keymap,find the keyshort,use it,it will expand nodes level by level.The other two command within Others is not useful.

And you can also set mouse shortcut like "ALT+[Wheel Down]",this can help you expand all without one hand leaving the mouse. More efficient,you can Set "Collapse Node" keyshort to "ALT+[Wheel Up]".

https://i.stack.imgur.com/aCILj.gif"/>

Solution 3 - Intellij Idea

Now, you can expand the entire directory structure in IntelliJ. All you need to do is to select the project in project explorer and hold Right Arrow button. It will expand all the files in that project.

Solution 4 - Intellij Idea

Without setting keymap

If you think you won't use this feature often, I'd rather go with just selecting the folder you want to fully expand, pressing double shift and search for "Fully Expand Tree Node".

how search look like

Solution 5 - Intellij Idea

I use a simple approach. In my Mac, I've set a key map.

Using only Right Arrow expands folder (but sub-folders are not expanded).

So I've set a key map in Fully Expand Tree Node to CMD+Right Arrow to expand selected folder and all its sub-folders fully. To close/collapse it, simply use Left Arrow.

Solution 6 - Intellij Idea

I'm using v14. The title bar>Settings(icon) has an AutoScroll from Source option which, if checked, drops down the subordinate files in the tree. Is this what you are looking for? HTH

Solution 7 - Intellij Idea

  1. Go to File > Settings/Preferences
  2. Select Keymap
  3. In the search dialog search for "Fully Expand Tree Node". You will find the shortcut used for it.

To create your own keyboard shortcut for it:

  1. Right-click on the item you found in step 3 mentioned above and select Add Keyboard Shortcut
  2. On the Keyboard Shortcut dialog, press your desired shortcut keys (for example Alt + E).
  3. If it is not already assigned, save your changes and select the folder you want to extend and press the shortcut you created.

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmjsView Question on Stackoverflow
Solution 1 - Intellij IdeaBohuslav BurghardtView Answer on Stackoverflow
Solution 2 - Intellij IdeazwxView Answer on Stackoverflow
Solution 3 - Intellij IdeaunknownerrorView Answer on Stackoverflow
Solution 4 - Intellij IdeaAndras KloczlView Answer on Stackoverflow
Solution 5 - Intellij IdeaHarishView Answer on Stackoverflow
Solution 6 - Intellij IdeasaratogacoachView Answer on Stackoverflow
Solution 7 - Intellij IdeaLamya ElmorsyView Answer on Stackoverflow