简体   繁体   中英

How to navigate with VS code explorer

This is a question about the VS code explorer window navigation.

In the Windows Explorer application, I can instantly navigate down to any file that I choose. If the windows explorer window shows my folders or files in ascending name sequence, I can quickly select any of the entries below by typing the first letter of the file/folder that I'm looking for. For instance, if I type in "C", the selection instantly goes down to the first file/folder that begins with C. This has been the default Windows navigation for as far back as I can remember. So am I able to do this in the VS code explorer? My projects are rather long and having to scroll down to say the 50th(or 100th) file is kind of a pain. So is this feature or something like it available in VS code? The explorer window shows the file/folders in ascending sequence so this should be possible. If this is not a feature in VS code, what is the recommended way to navigate throughout the VS code explorer?

See keyboard navigation in the explorer :

There are now three different types of keyboard navigation in trees: simple, highlight, and filter. In both highlight and filter, typing in a tree will display a widget (control) at the top of the tree, which indicates that you are now navigating the tree:

[see the demo at the link above.] So you can filter or highlight matching folders or files if you type which the explorer has focus.

Try this setting:

"workbench.list.keyboardNavigation": "filter" 
     // see other options under this setting: highlight and simple

and explorer will filter out all non-matching folders/files. I wish it would automatically open those folders with matching files within but it doesn't. The folder is highlighted or passes the filter but it doesn't open.

In this demo (using the filter setting), first I pressed Ctrl - Shift - E to get Explorer focus (or you could just click anywhere in the explorer) and started typing.

Escape will clear the search and return the full explorer tree.

资源管理器中的键盘导航

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM