Reputation: 2714
Is there a way to expand a folder in the explorer of VS code only by using the keyboard? I can open files with CTRL + P
, but how do I expand a folder?
Upvotes: 1
Views: 1297
Reputation: 708
With the Vim extension, one can also navigate between directories in explorer using j
and k
, and expand and collapse a directory with l
and h
or you can press l
once again to collapse a directory when have expanded a directory.
Upvotes: 0
Reputation: 181160
If you have focus in the explorer, you can use the arrow keys to move around. You can open a folder with RightArrow or close it with LeftArrow. The explorer is treated as a list
so it uses the various list navigation keys/commands.
You can shift focus from the editor to that file in the explorer with Ctrl-Shift-E.
As of v1.31, you can use the Alt key to expand subfolders automatically when expanding the parent folder ala:
Expand/Collapse All
Holding the
Alt
key while expanding/collapsing tree nodes will now work recursively. Note that recursive expansion only works for nodes previously revealed in the tree. For example, the File Explorer will not automatically expand folders which were never expanded before by the user.
Upvotes: 2