The hidden power of option-click in vscode explorer

There is a common use case that you are working on a directory with many sub dirs and after a while it gets messy and you want to collapse all the sub dirs.

With the default Collapse Folders in Explorer button as below, you can collapse all the folders in the explorer by clicking it one or more times.

The hidden power of option-click in vscode explorer

But it don’t work if you want to collapse a specific folder.

Option-click is a hidden and ingenious feature that I happen to discover. Option-click on an open folder will collapse all the sub dirs underneath it, and Option-click on a closed folder will just open the folders that were previously opened.

The normal use case would be, if there is some emergency to work in another directory when I am working in a directory 5 levels down from the root, I can just Option-click to collapse all the folders in Explorer to get a clean directory. Then after this emergent work’s done, I can just Option-click on the root directory without navigating back down 5 levels to the directory I was working in. It’s like having a memory!

References

Explorer: allow to expand a sub-tree fully via Alt-click · Issue #9456 · microsoft/vscode

本作品采用《CC 协议》,转载必须注明作者和本文链接
日拱一卒
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
未填写
文章
93
粉丝
85
喜欢
153
收藏
121
排名:71
访问:11.4 万
私信
所有博文
社区赞助商