Vscode: Open File Preview when using Keyboard navigation in Explorer for better accessibility.

Created on 4 Aug 2018  路  13Comments  路  Source: microsoft/vscode

When using the up and down arrow keys in the file explorer panel to navigate between files it would be good for the file you have selected to be opened in Preview mode.

This should be the default behavior or at least placed behind an option.

If that's not possible then using the spacebar to preview a file (or toggle preview) would be good. The spacebar is already used to toggle open/closed folders but it does nothing on files.

I'm also curious if it's possible to enable this behavior with an extension.

feature-request tree verification-needed verified

All 13 comments

The files will be opened in preview if you do enter on them or cmd + down on the mac.
Opening all files just as you move through them is not something we do in any other place in vscode (open editors, callstack view, problems view) so it would not be alligned with our other trees.

We could add an option for this to be respected by all trees across the workbench, but this is not on our immediate plan.
fyi @bpasero

How could someone make a script that runs cmd+down when navigating the explorer with the up and down arrow keys?

hey, @isidorn, having the files previewed on arrow-up/arrow-down would be consistent with the default existing behavior of previewing the contents on mouse-click, and would improve user experience while browsing the codebase ... Or is there anything that I am missing here?

You can preview the files now by pressing space in the explorer.
We will not preview them just by traversing since that is not aligned with the rest of the trees in the workbench

@isidorn pressing the space key in the VSCode explorer panel does not preview the file for me. Having to press cmd + down arrow to preview the highlight file is less than ideal because you then have to press shift + cmd + E to go back to the explorer.

The primary use case is familiarizing yourself with a new codebase and wanting to see what each file contains. Of course, I can just jump back to the finder and do it that way, but I'd prefer to stay within VSCode.

The space key works in vscode insiders and will be availble in vscode stable in a couple of weeks.

Having the file shown on pressing space is better that what exists today -- thank you for the news, @isidorn!

Nevertheless, I still don't see the issue in showing the files on arrow up/arrow down; it _feels_ to me as an usability improvement, as it avoid the need of the mouse and let us keep our hands on the keyboard.

I also would really appreciate preview mode being activated when pressing the up or down arrows in the explorer window. It would help keep my hands off of the mouse.

Can you please file a new feature request for that so we have it on the radar. Thanks

To verify:
make sure you can open a file in preview by pressing the space key in the explorer.
Also make sure if you have multiple files selected they all get opened.

Can you please file a new feature request for that so we have it on the radar. Thanks

hey, @isidorn, I'm not sure I understood; did you mean to open a new issue, for the files to be activated on the preview mode with up/down arrows?

@gerardolima yes please. Thanks.

hey, @isidorn, the issue #80266 was created for the up/down arrows.

Was this page helpful?
0 / 5 - 0 ratings