filevisual-studio-codetreeexplorer

VS Code navigate to top of file explorer tree


Excuse me if this has been answered elsewhere but I cannot seem to find a quick and simple solution to what I think is a pretty basic question!

So, what keyboard shortcut must I use to jump to the top of the File Explorer tree in VS Code?

If I've got a lot of folders open I can collapse them all with the little icon at the top but it still leaves me sitting wherever I was in the tree, meaning I have to scroll all the way to the top, or carefully drag the scroll bar up all the way. Very carefully, because if I miss and click on a file it opens it in the editor window! I just want to zoom right to the top in one easy movement!


Solution

  • The command you want is list.focusFirst. You can edit keybindings.

    More broadly, for navigation questions, see How can I navigate and manipulate list views in VS Code using the keyboard?.